From ce16093018384b3601cde650bed77c4f920b55a1 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:46:12 -0800 Subject: [PATCH] [AutoRelease] t2-network-2024-12-13-54887(can only be merged by SDK owner) (#38867) * code and test * update testcases * Update CHANGELOG.md * Update CHANGELOG.md * update-testcase --------- Co-authored-by: azure-sdk Co-authored-by: ChenxiJiang333 Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> --- sdk/network/azure-mgmt-network/CHANGELOG.md | 77 + .../azure/mgmt/network/__init__.py | 12 +- .../azure/mgmt/network/_configuration.py | 3 +- .../network/_network_management_client.py | 62 +- .../azure/mgmt/network/_serialization.py | 424 +- .../azure/mgmt/network/_vendor.py | 1 - .../azure/mgmt/network/_version.py | 2 +- .../azure/mgmt/network/aio/__init__.py | 12 +- .../azure/mgmt/network/aio/_configuration.py | 3 +- .../network/aio/_network_management_client.py | 62 +- .../azure/mgmt/network/aio/_vendor.py | 1 - .../mgmt/network/aio/operations/__init__.py | 310 +- .../network/aio/operations/_operations.py | 15086 +++++++---- .../azure/mgmt/network/models/__init__.py | 2038 +- .../azure/mgmt/network/models/_models_py3.py | 2526 +- .../_network_management_client_enums.py | 79 +- .../azure/mgmt/network/operations/__init__.py | 310 +- .../mgmt/network/operations/_operations.py | 22412 ++++++++++------ ...n_gateway_available_request_headers_get.py | 2 +- ..._gateway_available_response_headers_get.py | 2 +- ..._gateway_available_server_variables_get.py | 2 +- ...ation_gateway_available_ssl_options_get.py | 2 +- ...ble_ssl_options_predefined_policies_get.py | 2 +- ...lable_ssl_options_predefined_policy_get.py | 2 +- ...ion_gateway_available_waf_rule_sets_get.py | 2 +- .../application_gateway_backend_health_get.py | 2 +- ...application_gateway_backend_health_test.py | 2 +- .../application_gateway_create.py | 2 +- .../application_gateway_delete.py | 2 +- .../application_gateway_get.py | 2 +- .../application_gateway_list.py | 2 +- .../application_gateway_list_all.py | 2 +- ...eway_private_endpoint_connection_delete.py | 2 +- ...gateway_private_endpoint_connection_get.py | 2 +- ...ateway_private_endpoint_connection_list.py | 2 +- ...eway_private_endpoint_connection_update.py | 2 +- ...tion_gateway_private_link_resource_list.py | 2 +- .../application_gateway_start.py | 2 +- .../application_gateway_stop.py | 2 +- .../application_gateway_update_tags.py | 2 +- .../application_security_group_create.py | 2 +- .../application_security_group_delete.py | 2 +- .../application_security_group_get.py | 2 +- .../application_security_group_list.py | 2 +- .../application_security_group_list_all.py | 2 +- .../application_security_group_update_tags.py | 2 +- ...auto_approved_private_link_services_get.py | 2 +- ...rivate_link_services_resource_group_get.py | 2 +- ...vailable_delegations_resource_group_get.py | 2 +- .../available_delegations_subscription_get.py | 2 +- .../available_private_endpoint_types_get.py | 2 +- ...ivate_endpoint_types_resource_group_get.py | 2 +- .../available_service_aliases_list.py | 2 +- ..._service_aliases_list_by_resource_group.py | 2 +- .../azure_firewall_delete.py | 2 +- ...firewall_fqdn_tags_list_by_subscription.py | 2 +- .../generated_samples/azure_firewall_get.py | 2 +- ...firewall_get_with_additional_properties.py | 2 +- .../azure_firewall_get_with_ip_groups.py | 2 +- .../azure_firewall_get_with_mgmt_subnet.py | 2 +- .../azure_firewall_get_with_zones.py | 2 +- .../azure_firewall_list_by_resource_group.py | 2 +- .../azure_firewall_list_by_subscription.py | 2 +- ...azure_firewall_list_learned_ip_prefixes.py | 2 +- .../azure_firewall_packet_capture.py | 2 +- .../generated_samples/azure_firewall_put.py | 2 +- .../azure_firewall_put_in_hub.py | 2 +- ...firewall_put_with_additional_properties.py | 2 +- .../azure_firewall_put_with_ip_groups.py | 2 +- .../azure_firewall_put_with_mgmt_subnet.py | 2 +- .../azure_firewall_put_with_zones.py | 2 +- .../azure_firewall_update_tags.py | 2 +- ...ure_web_categories_list_by_subscription.py | 2 +- .../azure_web_category_get.py | 2 +- .../generated_samples/bastion_host_delete.py | 2 +- .../bastion_host_developer_delete.py | 2 +- .../bastion_host_developer_get.py | 2 +- .../bastion_host_developer_put.py | 2 +- .../generated_samples/bastion_host_get.py | 2 +- .../bastion_host_get_with_private_only.py | 42 + .../bastion_host_get_with_zones.py | 4 +- .../bastion_host_list_by_resource_group.py | 2 +- .../bastion_host_list_by_subscription.py | 2 +- .../generated_samples/bastion_host_patch.py | 2 +- .../generated_samples/bastion_host_put.py | 2 +- .../bastion_host_put_with_private_only.py | 57 + .../bastion_host_put_with_zones.py | 2 +- .../bastion_session_delete.py | 2 +- .../bastion_sessions_list.py | 2 +- .../bastion_shareable_link_create.py | 2 +- .../bastion_shareable_link_delete.py | 2 +- .../bastion_shareable_link_delete_by_token.py | 2 +- .../bastion_shareable_link_get.py | 2 +- .../check_dns_name_availability.py | 2 +- .../check_private_link_service_visibility.py | 2 +- ...nk_service_visibility_by_resource_group.py | 2 +- .../cloud_service_network_interface_get.py | 2 +- .../cloud_service_network_interface_list.py | 2 +- .../cloud_service_public_ip_get.py | 2 +- .../cloud_service_public_ip_list_all.py | 2 +- ...ce_role_instance_network_interface_list.py | 2 +- ...ud_service_role_instance_public_ip_list.py | 2 +- .../cloud_service_swap_get.py | 2 +- .../cloud_service_swap_list.py | 2 +- .../cloud_service_swap_put.py | 2 +- .../configuration_policy_group_delete.py | 2 +- .../configuration_policy_group_get.py | 2 +- ..._group_list_by_vpn_server_configuration.py | 2 +- ...stom_ip_prefix_create_customized_values.py | 2 +- .../custom_ip_prefix_delete.py | 2 +- .../generated_samples/custom_ip_prefix_get.py | 2 +- .../custom_ip_prefix_list.py | 2 +- .../custom_ip_prefix_list_all.py | 2 +- .../custom_ip_prefix_update_tags.py | 2 +- .../ddos_custom_policy_create.py | 2 +- .../ddos_custom_policy_delete.py | 2 +- .../ddos_custom_policy_get.py | 2 +- .../ddos_custom_policy_update_tags.py | 2 +- .../ddos_protection_plan_create.py | 2 +- .../ddos_protection_plan_delete.py | 2 +- .../ddos_protection_plan_get.py | 2 +- .../ddos_protection_plan_list.py | 2 +- .../ddos_protection_plan_list_all.py | 2 +- .../ddos_protection_plan_update_tags.py | 2 +- .../default_security_rule_get.py | 2 +- .../default_security_rule_list.py | 2 +- .../dscp_configuration_create.py | 2 +- .../dscp_configuration_delete.py | 2 +- .../dscp_configuration_get.py | 2 +- .../dscp_configuration_list.py | 2 +- .../dscp_configuration_list_all.py | 2 +- .../effective_routes_list_for_connection.py | 2 +- .../effective_routes_list_for_route_table.py | 2 +- .../effective_routes_list_for_virtual_hub.py | 2 +- .../endpoint_services_list.py | 2 +- .../express_route_circuit_arp_table_list.py | 2 +- ...ress_route_circuit_authorization_create.py | 2 +- ...ress_route_circuit_authorization_delete.py | 2 +- ...express_route_circuit_authorization_get.py | 2 +- ...xpress_route_circuit_authorization_list.py | 2 +- ...express_route_circuit_connection_create.py | 2 +- ...express_route_circuit_connection_delete.py | 2 +- .../express_route_circuit_connection_get.py | 2 +- .../express_route_circuit_connection_list.py | 2 +- .../express_route_circuit_create.py | 2 +- ...te_circuit_create_on_express_route_port.py | 2 +- .../express_route_circuit_delete.py | 2 +- .../express_route_circuit_get.py | 2 +- ...ss_route_circuit_list_by_resource_group.py | 2 +- ...ress_route_circuit_list_by_subscription.py | 2 +- .../express_route_circuit_peering_create.py | 2 +- .../express_route_circuit_peering_delete.py | 2 +- .../express_route_circuit_peering_get.py | 2 +- .../express_route_circuit_peering_list.py | 2 +- .../express_route_circuit_peering_stats.py | 2 +- .../express_route_circuit_route_table_list.py | 2 +- ..._route_circuit_route_table_summary_list.py | 2 +- .../express_route_circuit_stats.py | 2 +- .../express_route_circuit_update_tags.py | 2 +- .../express_route_connection_create.py | 2 +- .../express_route_connection_delete.py | 2 +- .../express_route_connection_get.py | 2 +- .../express_route_connection_list.py | 2 +- ...ute_cross_connection_bgp_peering_create.py | 2 +- ...ute_cross_connection_bgp_peering_delete.py | 2 +- ..._route_cross_connection_bgp_peering_get.py | 2 +- ...route_cross_connection_bgp_peering_list.py | 2 +- .../express_route_cross_connection_get.py | 2 +- .../express_route_cross_connection_list.py | 2 +- ...cross_connection_list_by_resource_group.py | 2 +- .../express_route_cross_connection_update.py | 2 +- ...ress_route_cross_connection_update_tags.py | 2 +- ...press_route_cross_connections_arp_table.py | 2 +- ...ess_route_cross_connections_route_table.py | 2 +- ...e_cross_connections_route_table_summary.py | 2 +- .../express_route_gateway_create.py | 2 +- .../express_route_gateway_delete.py | 2 +- .../express_route_gateway_get.py | 2 +- ...ss_route_gateway_list_by_resource_group.py | 2 +- ...ress_route_gateway_list_by_subscription.py | 2 +- .../express_route_gateway_update_tags.py | 2 +- .../express_route_link_get.py | 2 +- .../express_route_link_list.py | 2 +- ...express_route_port_authorization_create.py | 2 +- ...express_route_port_authorization_delete.py | 2 +- .../express_route_port_authorization_get.py | 2 +- .../express_route_port_authorization_list.py | 2 +- .../express_route_port_create.py | 2 +- .../express_route_port_delete.py | 2 +- .../express_route_port_get.py | 2 +- .../express_route_port_list.py | 2 +- ...press_route_port_list_by_resource_group.py | 2 +- .../express_route_port_update_link.py | 2 +- .../express_route_port_update_tags.py | 2 +- .../express_route_ports_location_get.py | 2 +- .../express_route_ports_location_list.py | 2 +- .../express_route_provider_list.py | 2 +- .../express_route_provider_port.py | 2 +- .../express_route_provider_port_list.py | 2 +- .../firewall_policy_delete.py | 2 +- .../firewall_policy_draft_delete.py | 2 +- .../firewall_policy_draft_deploy.py | 2 +- .../firewall_policy_draft_get.py | 2 +- .../firewall_policy_draft_put.py | 2 +- .../generated_samples/firewall_policy_get.py | 2 +- .../firewall_policy_list_by_resource_group.py | 2 +- .../firewall_policy_list_by_subscription.py | 2 +- ...ll_policy_nat_rule_collection_group_get.py | 2 +- ...ll_policy_nat_rule_collection_group_put.py | 2 +- .../firewall_policy_patch.py | 2 +- .../generated_samples/firewall_policy_put.py | 2 +- ...rewall_policy_query_signature_overrides.py | 2 +- ...query_signature_overrides_filter_values.py | 2 +- ...all_policy_rule_collection_group_delete.py | 2 +- ...licy_rule_collection_group_draft_delete.py | 2 +- ..._policy_rule_collection_group_draft_get.py | 2 +- ..._policy_rule_collection_group_draft_put.py | 2 +- ...rewall_policy_rule_collection_group_get.py | 2 +- ...ewall_policy_rule_collection_group_list.py | 2 +- ...rewall_policy_rule_collection_group_put.py | 2 +- ...ction_group_with_http_headers_to_insert.py | 2 +- ...ule_collection_group_with_ip_groups_get.py | 2 +- ...le_collection_group_with_ip_groups_list.py | 2 +- ...ule_collection_group_with_ip_groups_put.py | 2 +- ...ollection_group_with_web_categories_get.py | 2 +- ...llection_group_with_web_categories_list.py | 2 +- ...ollection_group_with_web_categories_put.py | 2 +- ...firewall_policy_signature_overrides_get.py | 2 +- ...irewall_policy_signature_overrides_list.py | 2 +- ...rewall_policy_signature_overrides_patch.py | 2 +- ...firewall_policy_signature_overrides_put.py | 2 +- .../generate_express_route_ports_loa.py | 2 +- ...an_vpn_server_configuration_vpn_profile.py | 2 +- ...plication_gateway_waf_dynamic_manifests.py | 2 +- ...n_gateway_waf_dynamic_manifests_default.py | 2 +- .../generated_samples/get_inbound_routes.py | 2 +- .../generated_samples/get_outbound_routes.py | 2 +- ...t_virtual_wan_vpn_server_configurations.py | 2 +- .../hub_route_table_delete.py | 2 +- .../generated_samples/hub_route_table_get.py | 2 +- .../generated_samples/hub_route_table_list.py | 2 +- .../generated_samples/hub_route_table_put.py | 2 +- .../hub_virtual_network_connection_delete.py | 2 +- .../hub_virtual_network_connection_get.py | 2 +- .../hub_virtual_network_connection_list.py | 2 +- .../hub_virtual_network_connection_put.py | 2 +- .../inbound_nat_rule_create.py | 2 +- .../inbound_nat_rule_delete.py | 2 +- .../generated_samples/inbound_nat_rule_get.py | 2 +- .../inbound_nat_rule_list.py | 2 +- .../inbound_security_rule_get.py | 2 +- .../inbound_security_rule_put.py | 2 +- .../generated_samples/ip_allocation_create.py | 2 +- .../generated_samples/ip_allocation_delete.py | 2 +- .../generated_samples/ip_allocation_get.py | 2 +- .../generated_samples/ip_allocation_list.py | 2 +- .../ip_allocation_list_by_resource_group.py | 2 +- .../ip_allocation_update_tags.py | 2 +- .../generated_samples/ip_groups_create.py | 2 +- .../generated_samples/ip_groups_delete.py | 2 +- .../generated_samples/ip_groups_get.py | 2 +- .../ip_groups_list_by_resource_group.py | 2 +- .../ip_groups_list_by_subscription.py | 2 +- .../ip_groups_update_tags.py | 2 +- .../generated_samples/ipam_pools_create.py | 51 + .../generated_samples/ipam_pools_delete.py | 42 + .../generated_samples/ipam_pools_get.py | 43 + .../ipam_pools_get_pool_usage.py | 43 + .../generated_samples/ipam_pools_list.py | 43 + .../ipam_pools_list_associated_resources.py | 44 + .../generated_samples/ipam_pools_update.py | 43 + ...l_list_with_backend_addresses_pool_type.py | 2 +- ...address_pool_with_backend_addresses_get.py | 2 +- ...address_pool_with_backend_addresses_put.py | 2 +- ...ad_balancer_backend_address_pool_delete.py | 2 +- .../load_balancer_backend_address_pool_get.py | 2 +- ...load_balancer_backend_address_pool_list.py | 2 +- .../generated_samples/load_balancer_create.py | 2 +- ...r_create_gateway_load_balancer_consumer.py | 2 +- ...balancer_provider_with_one_backend_pool.py | 2 +- ...balancer_provider_with_two_backend_pool.py | 2 +- .../load_balancer_create_global_tier.py | 2 +- .../load_balancer_create_standard_sku.py | 2 +- ...d_balancer_create_with_inbound_nat_pool.py | 2 +- ...oad_balancer_create_with_outbound_rules.py | 2 +- ..._create_with_sync_mode_property_on_pool.py | 2 +- .../load_balancer_create_with_zones.py | 2 +- .../generated_samples/load_balancer_delete.py | 2 +- ..._balancer_frontend_ip_configuration_get.py | 2 +- ...balancer_frontend_ip_configuration_list.py | 2 +- .../generated_samples/load_balancer_get.py | 2 +- ...ancer_get_inbound_nat_rule_port_mapping.py | 2 +- .../generated_samples/load_balancer_health.py | 43 + .../generated_samples/load_balancer_list.py | 2 +- .../load_balancer_list_all.py | 2 +- .../load_balancer_load_balancing_rule_get.py | 2 +- .../load_balancer_load_balancing_rule_list.py | 2 +- ..._balancer_network_interface_list_simple.py | 2 +- ...ad_balancer_network_interface_list_vmss.py | 2 +- .../load_balancer_outbound_rule_get.py | 2 +- .../load_balancer_outbound_rule_list.py | 2 +- .../load_balancer_probe_get.py | 2 +- .../load_balancer_probe_list.py | 2 +- .../load_balancer_update_tags.py | 2 +- ...load_balancers_swap_public_ip_addresses.py | 2 +- .../local_network_gateway_create.py | 2 +- .../local_network_gateway_delete.py | 2 +- .../local_network_gateway_get.py | 2 +- .../local_network_gateway_list.py | 2 +- .../local_network_gateway_update_tags.py | 2 +- .../migrate_load_balancer_to_ip_based.py | 2 +- .../nat_gateway_create_or_update.py | 2 +- .../generated_samples/nat_gateway_delete.py | 2 +- .../generated_samples/nat_gateway_get.py | 2 +- .../generated_samples/nat_gateway_list.py | 2 +- .../generated_samples/nat_gateway_list_all.py | 2 +- .../nat_gateway_update_tags.py | 2 +- .../generated_samples/nat_rule_delete.py | 2 +- .../generated_samples/nat_rule_get.py | 2 +- .../generated_samples/nat_rule_list.py | 2 +- .../network_interface_create.py | 2 +- ...e_create_gateway_load_balancer_consumer.py | 2 +- .../network_interface_delete.py | 2 +- .../network_interface_effective_nsg_list.py | 2 +- ...rk_interface_effective_route_table_list.py | 2 +- .../network_interface_get.py | 2 +- .../network_interface_ip_configuration_get.py | 2 +- ...network_interface_ip_configuration_list.py | 2 +- .../network_interface_list.py | 2 +- .../network_interface_list_all.py | 2 +- .../network_interface_load_balancer_list.py | 2 +- ...work_interface_tap_configuration_create.py | 2 +- ...work_interface_tap_configuration_delete.py | 2 +- ...network_interface_tap_configuration_get.py | 2 +- ...etwork_interface_tap_configuration_list.py | 2 +- .../network_interface_update_tags.py | 2 +- ...active_connectivity_configurations_list.py | 2 +- ...anager_active_security_admin_rules_list.py | 2 +- ...rk_manager_admin_rule_collection_delete.py | 2 +- ...twork_manager_admin_rule_collection_get.py | 2 +- ...work_manager_admin_rule_collection_list.py | 2 +- ...twork_manager_admin_rule_collection_put.py | 2 +- .../network_manager_admin_rule_delete.py | 2 +- .../network_manager_admin_rule_get.py | 2 +- .../network_manager_admin_rule_list.py | 2 +- .../network_manager_admin_rule_put.py | 2 +- ...ger_admin_rule_put_network_group_source.py | 64 + .../network_manager_commit_post.py | 2 +- ...ager_connection_management_group_delete.py | 2 +- ...manager_connection_management_group_get.py | 2 +- ...anager_connection_management_group_list.py | 2 +- ...manager_connection_management_group_put.py | 2 +- ..._manager_connection_subscription_delete.py | 2 +- ...ork_manager_connection_subscription_get.py | 2 +- ...rk_manager_connection_subscription_list.py | 2 +- ...ork_manager_connection_subscription_put.py | 2 +- ...nager_connectivity_configuration_delete.py | 2 +- ..._manager_connectivity_configuration_get.py | 2 +- ...manager_connectivity_configuration_list.py | 2 +- ..._manager_connectivity_configuration_put.py | 2 +- .../network_manager_default_admin_rule_get.py | 2 +- .../network_manager_delete.py | 2 +- .../network_manager_deployment_status_list.py | 2 +- ...ective_connectivity_configurations_list.py | 2 +- ...ger_effective_security_admin_rules_list.py | 2 +- .../generated_samples/network_manager_get.py | 2 +- .../network_manager_group_delete.py | 2 +- .../network_manager_group_get.py | 2 +- .../network_manager_group_list.py | 2 +- .../network_manager_group_put.py | 2 +- .../generated_samples/network_manager_list.py | 2 +- .../network_manager_list_all.py | 2 +- .../network_manager_patch.py | 2 +- .../generated_samples/network_manager_put.py | 2 +- ...rk_manager_routing_configuration_delete.py | 2 +- ...twork_manager_routing_configuration_get.py | 2 +- ...work_manager_routing_configuration_list.py | 2 +- ...twork_manager_routing_configuration_put.py | 2 +- ..._manager_routing_rule_collection_delete.py | 2 +- ...ork_manager_routing_rule_collection_get.py | 2 +- ...rk_manager_routing_rule_collection_list.py | 2 +- ...ork_manager_routing_rule_collection_put.py | 2 +- .../network_manager_routing_rule_delete.py | 2 +- .../network_manager_routing_rule_get.py | 2 +- .../network_manager_routing_rule_list.py | 2 +- .../network_manager_routing_rule_put.py | 2 +- ...network_manager_scope_connection_delete.py | 2 +- .../network_manager_scope_connection_get.py | 2 +- .../network_manager_scope_connection_list.py | 2 +- .../network_manager_scope_connection_put.py | 2 +- ...ger_security_admin_configuration_delete.py | 2 +- ...anager_security_admin_configuration_get.py | 2 +- ...nager_security_admin_configuration_list.py | 2 +- ...anager_security_admin_configuration_put.py | 2 +- ...in_configuration_put_manual_aggregation.py | 49 + ...ager_security_user_configuration_delete.py | 2 +- ...manager_security_user_configuration_get.py | 2 +- ...anager_security_user_configuration_list.py | 2 +- ...manager_security_user_configuration_put.py | 2 +- ...er_security_user_rule_collection_delete.py | 2 +- ...nager_security_user_rule_collection_get.py | 2 +- ...ager_security_user_rule_collection_list.py | 2 +- ...nager_security_user_rule_collection_put.py | 2 +- ...twork_manager_security_user_rule_delete.py | 2 +- .../network_manager_security_user_rule_get.py | 2 +- ...network_manager_security_user_rule_list.py | 2 +- .../network_manager_security_user_rule_put.py | 2 +- .../network_manager_static_member_delete.py | 2 +- .../network_manager_static_member_get.py | 2 +- .../network_manager_static_member_list.py | 2 +- .../network_manager_static_member_put.py | 2 +- .../network_profile_create_config_only.py | 2 +- .../network_profile_delete.py | 2 +- .../network_profile_get_config_only.py | 2 +- .../network_profile_get_with_container_nic.py | 2 +- .../generated_samples/network_profile_list.py | 2 +- .../network_profile_list_all.py | 2 +- .../network_profile_update_tags.py | 2 +- .../network_security_group_create.py | 2 +- ...network_security_group_create_with_rule.py | 2 +- .../network_security_group_delete.py | 2 +- .../network_security_group_get.py | 2 +- .../network_security_group_list.py | 2 +- .../network_security_group_list_all.py | 2 +- .../network_security_group_rule_create.py | 2 +- .../network_security_group_rule_delete.py | 2 +- .../network_security_group_rule_get.py | 2 +- .../network_security_group_rule_list.py | 2 +- .../network_security_group_update_tags.py | 2 +- ...ork_virtual_appliance_connection_delete.py | 2 +- ...etwork_virtual_appliance_connection_get.py | 2 +- ...twork_virtual_appliance_connection_list.py | 2 +- .../network_virtual_appliance_delete.py | 2 +- ...network_virtual_appliance_empty_restart.py | 2 +- .../network_virtual_appliance_get.py | 2 +- ...irtual_appliance_list_by_resource_group.py | 2 +- ..._virtual_appliance_list_by_subscription.py | 2 +- .../network_virtual_appliance_put.py | 2 +- .../network_virtual_appliance_saa_sput.py | 2 +- .../network_virtual_appliance_site_delete.py | 2 +- .../network_virtual_appliance_site_get.py | 2 +- .../network_virtual_appliance_site_list.py | 2 +- .../network_virtual_appliance_site_put.py | 2 +- .../network_virtual_appliance_sku_get.py | 2 +- .../network_virtual_appliance_sku_list.py | 2 +- ...work_virtual_appliance_specific_restart.py | 2 +- .../network_virtual_appliance_update_tags.py | 2 +- ...rk_watcher_available_providers_list_get.py | 2 +- ...k_watcher_azure_reachability_report_get.py | 2 +- ...twork_watcher_connection_monitor_create.py | 2 +- ...nection_monitor_create_with_arc_network.py | 2 +- ...twork_watcher_connection_monitor_delete.py | 2 +- .../network_watcher_connection_monitor_get.py | 2 +- ...network_watcher_connection_monitor_list.py | 2 +- ...etwork_watcher_connection_monitor_query.py | 2 +- ...etwork_watcher_connection_monitor_start.py | 2 +- ...network_watcher_connection_monitor_stop.py | 2 +- ..._watcher_connection_monitor_update_tags.py | 2 +- ...rk_watcher_connection_monitor_v2_create.py | 2 +- .../network_watcher_connectivity_check.py | 2 +- .../network_watcher_create.py | 2 +- .../network_watcher_delete.py | 2 +- .../network_watcher_flow_log_configure.py | 2 +- .../network_watcher_flow_log_create.py | 2 +- .../network_watcher_flow_log_delete.py | 2 +- .../network_watcher_flow_log_get.py | 2 +- .../network_watcher_flow_log_list.py | 2 +- .../network_watcher_flow_log_status_query.py | 2 +- .../network_watcher_flow_log_update_tags.py | 2 +- .../generated_samples/network_watcher_get.py | 2 +- .../network_watcher_ip_flow_verify.py | 2 +- .../generated_samples/network_watcher_list.py | 2 +- .../network_watcher_list_all.py | 2 +- ...atcher_network_configuration_diagnostic.py | 2 +- .../network_watcher_next_hop_get.py | 2 +- .../network_watcher_packet_capture_create.py | 2 +- .../network_watcher_packet_capture_delete.py | 2 +- .../network_watcher_packet_capture_get.py | 2 +- ...ork_watcher_packet_capture_query_status.py | 2 +- .../network_watcher_packet_capture_stop.py | 2 +- .../network_watcher_packet_captures_list.py | 2 +- ...network_watcher_security_group_view_get.py | 2 +- .../network_watcher_topology_get.py | 2 +- .../network_watcher_troubleshoot_get.py | 2 +- ...twork_watcher_troubleshoot_result_query.py | 2 +- .../network_watcher_update_tags.py | 2 +- .../generated_samples/operation_list.py | 2 +- .../p2_svpn_gateway_delete.py | 2 +- .../p2_svpn_gateway_generate_vpn_profile.py | 2 +- .../generated_samples/p2_svpn_gateway_get.py | 2 +- .../p2_svpn_gateway_get_connection_health.py | 2 +- ..._gateway_get_connection_health_detailed.py | 2 +- .../generated_samples/p2_svpn_gateway_list.py | 2 +- .../p2_svpn_gateway_list_by_resource_group.py | 2 +- .../generated_samples/p2_svpn_gateway_put.py | 2 +- .../p2_svpn_gateway_reset.py | 2 +- .../p2_svpn_gateway_update_tags.py | 2 +- ...gateways_disconnect_p2s_vpn_connections.py | 2 +- ...er_express_route_circuit_connection_get.py | 2 +- ...r_express_route_circuit_connection_list.py | 2 +- .../private_endpoint_create.py | 2 +- ...ate_endpoint_create_for_manual_approval.py | 2 +- .../private_endpoint_create_with_asg.py | 2 +- .../private_endpoint_delete.py | 2 +- .../private_endpoint_dns_zone_group_create.py | 2 +- .../private_endpoint_dns_zone_group_delete.py | 2 +- .../private_endpoint_dns_zone_group_get.py | 2 +- .../private_endpoint_dns_zone_group_list.py | 2 +- .../generated_samples/private_endpoint_get.py | 2 +- ...rivate_endpoint_get_for_manual_approval.py | 2 +- .../private_endpoint_get_with_asg.py | 2 +- .../private_endpoint_list.py | 2 +- .../private_endpoint_list_all.py | 2 +- .../private_link_service_create.py | 2 +- .../private_link_service_delete.py | 2 +- ...vice_delete_private_endpoint_connection.py | 2 +- .../private_link_service_get.py | 2 +- ...service_get_private_endpoint_connection.py | 2 +- .../private_link_service_list.py | 2 +- .../private_link_service_list_all.py | 2 +- ...ervice_list_private_endpoint_connection.py | 2 +- ...vice_update_private_endpoint_connection.py | 2 +- ...lic_ip_address_create_customized_values.py | 2 +- .../public_ip_address_create_defaults.py | 2 +- .../public_ip_address_create_dns.py | 2 +- ...create_dns_with_domain_name_label_scope.py | 2 +- .../public_ip_address_delete.py | 2 +- .../public_ip_address_get.py | 2 +- ...c_ip_address_get_ddos_protection_status.py | 2 +- .../public_ip_address_list.py | 2 +- .../public_ip_address_list_all.py | 2 +- .../public_ip_address_update_tags.py | 2 +- ...blic_ip_prefix_create_customized_values.py | 2 +- .../public_ip_prefix_create_defaults.py | 2 +- .../public_ip_prefix_delete.py | 2 +- .../generated_samples/public_ip_prefix_get.py | 2 +- .../public_ip_prefix_list.py | 2 +- .../public_ip_prefix_list_all.py | 2 +- .../public_ip_prefix_update_tags.py | 2 +- .../query_inbound_nat_rule_port_mapping.py | 2 +- .../reachability_analysis_intent_delete.py | 43 + ...py => reachability_analysis_intent_get.py} | 12 +- .../reachability_analysis_intent_list.py | 44 + .../reachability_analysis_intent_put.py | 58 + .../reachability_analysis_run_delete.py | 43 + .../reachability_analysis_run_get.py | 44 + .../reachability_analysis_run_list.py | 44 + .../reachability_analysis_run_put.py | 50 + .../generated_samples/route_filter_create.py | 2 +- .../generated_samples/route_filter_delete.py | 2 +- .../generated_samples/route_filter_get.py | 2 +- .../generated_samples/route_filter_list.py | 2 +- .../route_filter_list_by_resource_group.py | 2 +- .../route_filter_rule_create.py | 2 +- .../route_filter_rule_delete.py | 2 +- .../route_filter_rule_get.py | 2 +- .../route_filter_rule_list_by_route_filter.py | 2 +- .../route_filter_update_tags.py | 2 +- .../generated_samples/route_map_delete.py | 2 +- .../generated_samples/route_map_get.py | 2 +- .../generated_samples/route_map_list.py | 2 +- .../generated_samples/route_map_put.py | 2 +- .../generated_samples/route_table_create.py | 2 +- .../route_table_create_with_route.py | 2 +- .../generated_samples/route_table_delete.py | 2 +- .../generated_samples/route_table_get.py | 2 +- .../generated_samples/route_table_list.py | 2 +- .../generated_samples/route_table_list_all.py | 2 +- .../route_table_route_create.py | 2 +- .../route_table_route_delete.py | 2 +- .../route_table_route_get.py | 2 +- .../route_table_route_list.py | 2 +- .../route_table_update_tags.py | 2 +- .../routing_intent_delete.py | 2 +- .../generated_samples/routing_intent_get.py | 2 +- .../generated_samples/routing_intent_list.py | 2 +- .../generated_samples/routing_intent_put.py | 2 +- .../security_partner_provider_delete.py | 2 +- .../security_partner_provider_get.py | 2 +- ...partner_provider_list_by_resource_group.py | 2 +- ...y_partner_provider_list_by_subscription.py | 2 +- .../security_partner_provider_put.py | 2 +- .../security_partner_provider_update_tags.py | 2 +- .../service_community_list.py | 2 +- .../service_endpoint_policy_create.py | 2 +- ..._endpoint_policy_create_with_definition.py | 2 +- ...rvice_endpoint_policy_definition_delete.py | 2 +- .../service_endpoint_policy_definition_get.py | 2 +- ...service_endpoint_policy_definition_list.py | 2 +- .../service_endpoint_policy_delete.py | 2 +- .../service_endpoint_policy_get.py | 2 +- .../service_endpoint_policy_list.py | 2 +- .../service_endpoint_policy_list_all.py | 2 +- .../service_endpoint_policy_update_tags.py | 2 +- .../service_tag_information_list_result.py | 2 +- ...on_list_result_with_no_address_prefixes.py | 2 +- ...ag_information_list_result_with_tagname.py | 2 +- .../generated_samples/service_tags_list.py | 2 +- .../generated_samples/static_cidrs_create.py | 44 + .../generated_samples/static_cidrs_delete.py | 43 + .../generated_samples/static_cidrs_get.py | 44 + .../generated_samples/static_cidrs_list.py | 44 + .../generated_samples/subnet_create.py | 2 +- .../subnet_create_service_endpoint.py | 2 +- ...ate_service_endpoint_network_identifier.py | 2 +- .../subnet_create_with_delegation.py | 2 +- .../subnet_create_with_sharing_scope.py | 2 +- .../generated_samples/subnet_delete.py | 2 +- .../generated_samples/subnet_get.py | 2 +- .../subnet_get_with_delegation.py | 2 +- .../subnet_get_with_sharing_scope.py | 2 +- .../generated_samples/subnet_list.py | 2 +- .../subnet_prepare_network_policies.py | 2 +- .../subnet_unprepare_network_policies.py | 2 +- .../generated_samples/usage_list.py | 2 +- .../usage_list_spaced_location.py | 2 +- .../verifier_workspace_delete.py | 42 + .../verifier_workspace_get.py | 43 + .../verifier_workspace_list.py | 43 + .../verifier_workspace_patch.py | 43 + .../verifier_workspace_put.py | 44 + .../virtual_hub_bgp_connection_delete.py | 2 +- .../virtual_hub_bgp_connection_get.py | 2 +- .../virtual_hub_bgp_connection_list.py | 2 +- .../virtual_hub_bgp_connection_put.py | 2 +- .../generated_samples/virtual_hub_delete.py | 2 +- .../generated_samples/virtual_hub_get.py | 2 +- .../virtual_hub_ip_configuration_delete.py | 2 +- .../virtual_hub_ip_configuration_get.py | 2 +- .../virtual_hub_ip_configuration_list.py | 2 +- .../virtual_hub_ip_configuration_put.py | 2 +- .../generated_samples/virtual_hub_list.py | 2 +- .../virtual_hub_list_by_resource_group.py | 2 +- .../generated_samples/virtual_hub_put.py | 2 +- .../virtual_hub_route_table_v2_delete.py | 2 +- .../virtual_hub_route_table_v2_get.py | 2 +- .../virtual_hub_route_table_v2_list.py | 2 +- .../virtual_hub_route_table_v2_put.py | 2 +- .../virtual_hub_update_tags.py | 2 +- ...l_network_check_ip_address_availability.py | 2 +- .../virtual_network_create.py | 2 +- ..._network_create_service_endpoint_policy.py | 2 +- ...irtual_network_create_service_endpoints.py | 2 +- .../virtual_network_create_subnet.py | 2 +- ...ork_create_subnet_with_address_prefixes.py | 2 +- ...l_network_create_subnet_with_delegation.py | 2 +- ...ual_network_create_with_bgp_communities.py | 2 +- .../virtual_network_create_with_encryption.py | 2 +- .../virtual_network_create_with_ipam_pool.py | 72 + .../virtual_network_delete.py | 2 +- ...rtual_network_gateway_connection_create.py | 2 +- ...rtual_network_gateway_connection_delete.py | 2 +- .../virtual_network_gateway_connection_get.py | 2 +- ..._network_gateway_connection_get_ike_sas.py | 2 +- ...twork_gateway_connection_get_shared_key.py | 2 +- ...irtual_network_gateway_connection_reset.py | 2 +- ...ork_gateway_connection_reset_shared_key.py | 2 +- ...twork_gateway_connection_set_shared_key.py | 2 +- ...gateway_connection_start_packet_capture.py | 2 +- ...ection_start_packet_capture_filter_data.py | 2 +- ..._gateway_connection_stop_packet_capture.py | 2 +- ..._network_gateway_connection_update_tags.py | 2 +- ...irtual_network_gateway_connections_list.py | 2 +- .../virtual_network_gateway_delete.py | 2 +- .../virtual_network_gateway_get.py | 2 +- ...l_network_gateway_get_advertised_routes.py | 2 +- ...ual_network_gateway_get_bgp_peer_status.py | 2 +- ..._gateway_get_failover_all_tests_details.py | 44 + ...ateway_get_failover_single_test_details.py | 44 + ...gateway_get_vpn_client_ipsec_parameters.py | 2 +- ...ork_gateway_get_vpn_profile_package_url.py | 2 +- ...gateway_get_vpnclient_connection_health.py | 2 +- .../virtual_network_gateway_learned_routes.py | 2 +- .../virtual_network_gateway_list.py | 2 +- ...virtual_network_gateway_nat_rule_delete.py | 2 +- .../virtual_network_gateway_nat_rule_get.py | 2 +- .../virtual_network_gateway_nat_rule_list.py | 2 +- .../virtual_network_gateway_reset.py | 2 +- ...ork_gateway_reset_vpn_client_shared_key.py | 2 +- ...gateway_set_vpn_client_ipsec_parameters.py | 2 +- ...al_network_gateway_start_packet_capture.py | 2 +- ...ateway_start_packet_capture_filter_data.py | 2 +- ..._gateway_start_site_failover_simulation.py | 43 + ...ual_network_gateway_stop_packet_capture.py | 2 +- ...k_gateway_stop_site_failover_simulation.py | 50 + ...al_network_gateway_supported_vpn_device.py | 2 +- .../virtual_network_gateway_update.py | 2 +- .../virtual_network_gateway_update_tags.py | 2 +- ...gateway_vpn_device_configuration_script.py | 2 +- ...gateways_disconnect_p2s_vpn_connections.py | 2 +- ...rtual_network_gateways_list_connections.py | 2 +- .../generated_samples/virtual_network_get.py | 2 +- ...tual_network_get_ddos_protection_status.py | 2 +- ...l_network_get_resource_navigation_links.py | 2 +- ...l_network_get_service_association_links.py | 2 +- ...twork_get_with_service_association_link.py | 2 +- ...tual_network_get_with_subnet_delegation.py | 2 +- .../generated_samples/virtual_network_list.py | 2 +- .../virtual_network_list_all.py | 2 +- .../virtual_network_list_usage.py | 2 +- .../virtual_network_peering_delete.py | 2 +- .../virtual_network_peering_get.py | 2 +- ..._with_remote_virtual_network_encryption.py | 2 +- .../virtual_network_peering_list.py | 2 +- ..._with_remote_virtual_network_encryption.py | 2 +- .../virtual_network_scalable_gateway_get.py | 2 +- ...virtual_network_scalable_gateway_update.py | 2 +- .../virtual_network_subnet_peering_get.py | 2 +- .../virtual_network_tap_create.py | 2 +- .../virtual_network_tap_delete.py | 2 +- .../virtual_network_tap_get.py | 2 +- .../virtual_network_tap_list.py | 2 +- .../virtual_network_tap_list_all.py | 2 +- .../virtual_network_tap_update_tags.py | 2 +- .../virtual_network_update_tags.py | 2 +- .../virtual_network_v6_subnet_peering_get.py | 2 +- .../virtual_router_delete.py | 2 +- .../generated_samples/virtual_router_get.py | 2 +- .../virtual_router_list_by_resource_group.py | 2 +- .../virtual_router_list_by_subscription.py | 2 +- ...rtual_router_peer_list_advertised_route.py | 2 +- .../virtual_router_peer_list_learned_route.py | 2 +- .../virtual_router_peering_delete.py | 2 +- .../virtual_router_peering_get.py | 2 +- .../virtual_router_peering_list.py | 2 +- .../virtual_router_peering_put.py | 2 +- .../generated_samples/virtual_router_put.py | 2 +- .../generated_samples/virtual_wan_delete.py | 2 +- .../generated_samples/virtual_wan_get.py | 2 +- .../generated_samples/virtual_wan_list.py | 2 +- .../virtual_wan_list_by_resource_group.py | 2 +- .../generated_samples/virtual_wan_put.py | 2 +- ...irtual_wan_supported_security_providers.py | 2 +- .../virtual_wan_update_tags.py | 2 +- .../vmss_network_interface_get.py | 2 +- .../vmss_network_interface_ip_config_get.py | 2 +- .../vmss_network_interface_ip_config_list.py | 2 +- .../vmss_network_interface_list.py | 2 +- .../generated_samples/vmss_public_ip_get.py | 2 +- .../vmss_public_ip_list_all.py | 2 +- .../vmss_vm_network_interface_list.py | 2 +- .../vmss_vm_public_ip_list.py | 2 +- .../vpn_connection_delete.py | 2 +- .../generated_samples/vpn_connection_get.py | 2 +- .../generated_samples/vpn_connection_list.py | 2 +- .../vpn_connection_start_packet_capture.py | 2 +- ...ection_start_packet_capture_filter_data.py | 2 +- .../vpn_connection_stop_packet_capture.py | 2 +- .../generated_samples/vpn_gateway_delete.py | 2 +- .../generated_samples/vpn_gateway_get.py | 2 +- .../generated_samples/vpn_gateway_list.py | 2 +- .../vpn_gateway_list_by_resource_group.py | 2 +- .../generated_samples/vpn_gateway_put.py | 2 +- .../generated_samples/vpn_gateway_reset.py | 2 +- .../vpn_gateway_start_packet_capture.py | 2 +- ...ateway_start_packet_capture_filter_data.py | 2 +- .../vpn_gateway_stop_packet_capture.py | 2 +- .../vpn_gateway_update_tags.py | 2 +- .../vpn_server_configuration_delete.py | 2 +- .../vpn_server_configuration_get.py | 2 +- .../vpn_server_configuration_list.py | 2 +- ...er_configuration_list_by_resource_group.py | 2 +- .../generated_samples/vpn_site_delete.py | 2 +- .../generated_samples/vpn_site_get.py | 2 +- ..._link_connection_default_shared_key_get.py | 2 +- ...link_connection_default_shared_key_list.py | 2 +- .../vpn_site_link_connection_get.py | 2 +- .../vpn_site_link_connection_get_ike_sas.py | 2 +- .../vpn_site_link_connection_list.py | 2 +- .../vpn_site_link_connection_reset.py | 2 +- ...pn_site_link_connection_shared_keys_get.py | 2 +- .../generated_samples/vpn_site_link_get.py | 2 +- .../vpn_site_link_list_by_vpn_site.py | 2 +- .../generated_samples/vpn_site_list.py | 2 +- .../vpn_site_list_by_resource_group.py | 2 +- .../vpn_sites_configuration_download.py | 2 +- .../waf_list_all_policies.py | 2 +- .../generated_samples/waf_list_policies.py | 2 +- .../waf_policy_create_or_update.py | 2 +- .../generated_samples/waf_policy_delete.py | 2 +- .../generated_samples/waf_policy_get.py | 2 +- .../generated_tests/conftest.py | 2 +- .../test_network_management.py | 28 +- ...ement_admin_rule_collections_operations.py | 16 +- ...admin_rule_collections_operations_async.py | 16 +- ...twork_management_admin_rules_operations.py | 16 +- ...management_admin_rules_operations_async.py | 16 +- ...private_endpoint_connections_operations.py | 105 +- ...e_endpoint_connections_operations_async.py | 105 +- ...teway_private_link_resources_operations.py | 4 +- ...private_link_resources_operations_async.py | 4 +- ...af_dynamic_manifests_default_operations.py | 4 +- ...amic_manifests_default_operations_async.py | 4 +- ...ateway_waf_dynamic_manifests_operations.py | 4 +- ..._waf_dynamic_manifests_operations_async.py | 4 +- ...agement_application_gateways_operations.py | 189 +- ...t_application_gateways_operations_async.py | 193 +- ..._application_security_groups_operations.py | 24 +- ...cation_security_groups_operations_async.py | 24 +- .../test_network_management_async.py | 28 +- ...gement_available_delegations_operations.py | 4 +- ..._available_delegations_operations_async.py | 4 +- ..._available_endpoint_services_operations.py | 4 +- ...able_endpoint_services_operations_async.py | 4 +- ...lable_private_endpoint_types_operations.py | 8 +- ...private_endpoint_types_operations_async.py | 8 +- ...e_resource_group_delegations_operations.py | 4 +- ...urce_group_delegations_operations_async.py | 4 +- ...nt_available_service_aliases_operations.py | 8 +- ...ilable_service_aliases_operations_async.py | 8 +- ...ent_azure_firewall_fqdn_tags_operations.py | 4 +- ...ure_firewall_fqdn_tags_operations_async.py | 4 +- ...k_management_azure_firewalls_operations.py | 32 +- ...gement_azure_firewalls_operations_async.py | 32 +- ...ork_management_bastion_hosts_operations.py | 25 +- ...nagement_bastion_hosts_operations_async.py | 25 +- ...ment_bgp_service_communities_operations.py | 4 +- ...gp_service_communities_operations_async.py | 4 +- ..._configuration_policy_groups_operations.py | 16 +- ...guration_policy_groups_operations_async.py | 16 +- ...nagement_connection_monitors_operations.py | 32 +- ...nt_connection_monitors_operations_async.py | 32 +- ..._connectivity_configurations_operations.py | 16 +- ...ctivity_configurations_operations_async.py | 16 +- ...anagement_custom_ip_prefixes_operations.py | 24 +- ...ent_custom_ip_prefixes_operations_async.py | 24 +- ...agement_ddos_custom_policies_operations.py | 16 +- ...t_ddos_custom_policies_operations_async.py | 16 +- ...gement_ddos_protection_plans_operations.py | 24 +- ..._ddos_protection_plans_operations_async.py | 24 +- ...ement_default_security_rules_operations.py | 8 +- ...default_security_rules_operations_async.py | 8 +- ...anagement_dscp_configuration_operations.py | 107 +- ...ent_dscp_configuration_operations_async.py | 115 +- ...route_circuit_authorizations_operations.py | 16 +- ...circuit_authorizations_operations_async.py | 16 +- ...ss_route_circuit_connections_operations.py | 16 +- ...te_circuit_connections_operations_async.py | 16 +- ...press_route_circuit_peerings_operations.py | 16 +- ...route_circuit_peerings_operations_async.py | 16 +- ...ement_express_route_circuits_operations.py | 44 +- ...express_route_circuits_operations_async.py | 44 +- ...nt_express_route_connections_operations.py | 16 +- ...ress_route_connections_operations_async.py | 16 +- ...te_cross_connection_peerings_operations.py | 16 +- ...ss_connection_peerings_operations_async.py | 16 +- ...ress_route_cross_connections_operations.py | 32 +- ...oute_cross_connections_operations_async.py | 32 +- ...ement_express_route_gateways_operations.py | 24 +- ...express_route_gateways_operations_async.py | 24 +- ...nagement_express_route_links_operations.py | 8 +- ...nt_express_route_links_operations_async.py | 8 +- ...ss_route_port_authorizations_operations.py | 16 +- ...te_port_authorizations_operations_async.py | 16 +- ...xpress_route_ports_locations_operations.py | 8 +- ..._route_ports_locations_operations_async.py | 8 +- ...nagement_express_route_ports_operations.py | 28 +- ...nt_express_route_ports_operations_async.py | 28 +- ...oute_provider_ports_location_operations.py | 4 +- ...rovider_ports_location_operations_async.py | 4 +- ...ress_route_service_providers_operations.py | 4 +- ...oute_service_providers_operations_async.py | 4 +- ...management_firewall_policies_operations.py | 24 +- ...ment_firewall_policies_operations_async.py | 24 +- ..._firewall_policy_deployments_operations.py | 4 +- ...all_policy_deployments_operations_async.py | 4 +- ...ement_firewall_policy_drafts_operations.py | 12 +- ...firewall_policy_drafts_operations_async.py | 12 +- ...dps_signatures_filter_values_operations.py | 4 +- ...gnatures_filter_values_operations_async.py | 4 +- ...ewall_policy_idps_signatures_operations.py | 4 +- ...policy_idps_signatures_operations_async.py | 4 +- ...cy_idps_signatures_overrides_operations.py | 16 +- ...s_signatures_overrides_operations_async.py | 16 +- ...rule_collection_group_drafts_operations.py | 12 +- ...ollection_group_drafts_operations_async.py | 12 +- ...olicy_rule_collection_groups_operations.py | 16 +- ...rule_collection_groups_operations_async.py | 16 +- ...network_management_flow_logs_operations.py | 20 +- ...k_management_flow_logs_operations_async.py | 20 +- ..._management_hub_route_tables_operations.py | 16 +- ...ement_hub_route_tables_operations_async.py | 16 +- ..._virtual_network_connections_operations.py | 16 +- ...al_network_connections_operations_async.py | 16 +- ...management_inbound_nat_rules_operations.py | 40 +- ...ment_inbound_nat_rules_operations_async.py | 44 +- ...gement_inbound_security_rule_operations.py | 8 +- ..._inbound_security_rule_operations_async.py | 8 +- ...rk_management_ip_allocations_operations.py | 24 +- ...agement_ip_allocations_operations_async.py | 24 +- ...network_management_ip_groups_operations.py | 24 +- ...k_management_ip_groups_operations_async.py | 24 +- ...etwork_management_ipam_pools_operations.py | 132 + ..._management_ipam_pools_operations_async.py | 137 + ...lancer_backend_address_pools_operations.py | 44 +- ..._backend_address_pools_operations_async.py | 48 +- ...r_frontend_ip_configurations_operations.py | 8 +- ...tend_ip_configurations_operations_async.py | 8 +- ...alancer_load_balancing_rules_operations.py | 21 +- ...r_load_balancing_rules_operations_async.py | 23 +- ..._balancer_network_interfaces_operations.py | 4 +- ...cer_network_interfaces_operations_async.py | 4 +- ...load_balancer_outbound_rules_operations.py | 8 +- ...alancer_outbound_rules_operations_async.py | 8 +- ...agement_load_balancer_probes_operations.py | 8 +- ...t_load_balancer_probes_operations_async.py | 8 +- ...rk_management_load_balancers_operations.py | 110 +- ...agement_load_balancers_operations_async.py | 118 +- ...ement_local_network_gateways_operations.py | 27 +- ...local_network_gateways_operations_async.py | 27 +- ..._network_manager_connections_operations.py | 16 +- ...rk_manager_connections_operations_async.py | 16 +- ...work_management_nat_gateways_operations.py | 24 +- ...anagement_nat_gateways_operations_async.py | 24 +- ...network_management_nat_rules_operations.py | 16 +- ...k_management_nat_rules_operations_async.py | 16 +- ...rk_management_network_groups_operations.py | 16 +- ...agement_network_groups_operations_async.py | 16 +- ..._interface_ip_configurations_operations.py | 8 +- ...face_ip_configurations_operations_async.py | 8 +- ...ork_interface_load_balancers_operations.py | 4 +- ...terface_load_balancers_operations_async.py | 4 +- ...interface_tap_configurations_operations.py | 36 +- ...ace_tap_configurations_operations_async.py | 44 +- ...anagement_network_interfaces_operations.py | 117 +- ...ent_network_interfaces_operations_async.py | 133 +- ...ment_network_manager_commits_operations.py | 4 +- ...etwork_manager_commits_operations_async.py | 4 +- ...rk_manager_deployment_status_operations.py | 4 +- ...ager_deployment_status_operations_async.py | 4 +- ...nager_routing_configurations_operations.py | 16 +- ...routing_configurations_operations_async.py | 16 +- ..._management_network_managers_operations.py | 24 +- ...ement_network_managers_operations_async.py | 24 +- ..._management_network_profiles_operations.py | 38 +- ...ement_network_profiles_operations_async.py | 38 +- ...ment_network_security_groups_operations.py | 112 +- ...etwork_security_groups_operations_async.py | 116 +- ...irtual_appliance_connections_operations.py | 16 +- ..._appliance_connections_operations_async.py | 16 +- ...t_network_virtual_appliances_operations.py | 28 +- ...ork_virtual_appliances_operations_async.py | 28 +- ..._management_network_watchers_operations.py | 72 +- ...ement_network_watchers_operations_async.py | 72 +- .../test_network_management_operations.py | 4 +- ...est_network_management_operations_async.py | 4 +- ..._management_p2_svpn_gateways_operations.py | 51 +- ...ement_p2_svpn_gateways_operations_async.py | 51 +- ...k_management_packet_captures_operations.py | 24 +- ...gement_packet_captures_operations_async.py | 24 +- ...ss_route_circuit_connections_operations.py | 8 +- ...te_circuit_connections_operations_async.py | 8 +- ...ment_private_dns_zone_groups_operations.py | 16 +- ...rivate_dns_zone_groups_operations_async.py | 16 +- ...management_private_endpoints_operations.py | 101 +- ...ment_private_endpoints_operations_async.py | 109 +- ...gement_private_link_services_operations.py | 283 +- ..._private_link_services_operations_async.py | 299 +- ...nagement_public_ip_addresses_operations.py | 51 +- ...nt_public_ip_addresses_operations_async.py | 51 +- ...anagement_public_ip_prefixes_operations.py | 24 +- ...ent_public_ip_prefixes_operations_async.py | 24 +- ...eachability_analysis_intents_operations.py | 100 + ...ility_analysis_intents_operations_async.py | 101 + ...t_reachability_analysis_runs_operations.py | 106 + ...hability_analysis_runs_operations_async.py | 109 + ...nt_resource_navigation_links_operations.py | 4 +- ...ource_navigation_links_operations_async.py | 4 +- ...anagement_route_filter_rules_operations.py | 16 +- ...ent_route_filter_rules_operations_async.py | 16 +- ...ork_management_route_filters_operations.py | 24 +- ...nagement_route_filters_operations_async.py | 24 +- ...etwork_management_route_maps_operations.py | 16 +- ..._management_route_maps_operations_async.py | 16 +- ...work_management_route_tables_operations.py | 29 +- ...anagement_route_tables_operations_async.py | 29 +- ...st_network_management_routes_operations.py | 16 +- ...work_management_routes_operations_async.py | 16 +- ...rk_management_routing_intent_operations.py | 16 +- ...agement_routing_intent_operations_async.py | 16 +- ...ent_routing_rule_collections_operations.py | 16 +- ...uting_rule_collections_operations_async.py | 16 +- ...ork_management_routing_rules_operations.py | 16 +- ...nagement_routing_rules_operations_async.py | 16 +- ...management_scope_connections_operations.py | 16 +- ...ment_scope_connections_operations_async.py | 16 +- ...ecurity_admin_configurations_operations.py | 17 +- ...y_admin_configurations_operations_async.py | 17 +- ...t_security_partner_providers_operations.py | 24 +- ...rity_partner_providers_operations_async.py | 24 +- ...rk_management_security_rules_operations.py | 16 +- ...agement_security_rules_operations_async.py | 16 +- ...security_user_configurations_operations.py | 16 +- ...ty_user_configurations_operations_async.py | 16 +- ...curity_user_rule_collections_operations.py | 16 +- ..._user_rule_collections_operations_async.py | 16 +- ...nagement_security_user_rules_operations.py | 16 +- ...nt_security_user_rules_operations_async.py | 16 +- ...nt_service_association_links_operations.py | 4 +- ...vice_association_links_operations_async.py | 4 +- ...nt_service_endpoint_policies_operations.py | 29 +- ...vice_endpoint_policies_operations_async.py | 29 +- ..._endpoint_policy_definitions_operations.py | 16 +- ...int_policy_definitions_operations_async.py | 16 +- ...ment_service_tag_information_operations.py | 4 +- ...ervice_tag_information_operations_async.py | 4 +- ...work_management_service_tags_operations.py | 4 +- ...anagement_service_tags_operations_async.py | 4 +- ...work_management_static_cidrs_operations.py | 74 + ...anagement_static_cidrs_operations_async.py | 77 + ...rk_management_static_members_operations.py | 16 +- ...agement_static_members_operations_async.py | 16 +- ...t_network_management_subnets_operations.py | 29 +- ...ork_management_subnets_operations_async.py | 29 +- ..._network_manager_connections_operations.py | 16 +- ...rk_manager_connections_operations_async.py | 16 +- ...st_network_management_usages_operations.py | 4 +- ...work_management_usages_operations_async.py | 4 +- ...nagement_verifier_workspaces_operations.py | 99 + ...nt_verifier_workspaces_operations_async.py | 102 + ..._network_management_vip_swap_operations.py | 12 +- ...rk_management_vip_swap_operations_async.py | 12 +- ...ment_virtual_appliance_sites_operations.py | 16 +- ...irtual_appliance_sites_operations_async.py | 16 +- ...ement_virtual_appliance_skus_operations.py | 8 +- ...virtual_appliance_skus_operations_async.py | 8 +- ...t_virtual_hub_bgp_connection_operations.py | 12 +- ...ual_hub_bgp_connection_operations_async.py | 12 +- ..._virtual_hub_bgp_connections_operations.py | 12 +- ...al_hub_bgp_connections_operations_async.py | 12 +- ...virtual_hub_ip_configuration_operations.py | 26 +- ...l_hub_ip_configuration_operations_async.py | 26 +- ..._virtual_hub_route_table_v2_soperations.py | 16 +- ...al_hub_route_table_v2_soperations_async.py | 16 +- ...work_management_virtual_hubs_operations.py | 36 +- ...anagement_virtual_hubs_operations_async.py | 36 +- ..._network_gateway_connections_operations.py | 97 +- ...rk_gateway_connections_operations_async.py | 105 +- ...al_network_gateway_nat_rules_operations.py | 16 +- ...work_gateway_nat_rules_operations_async.py | 16 +- ...ent_virtual_network_gateways_operations.py | 167 +- ...rtual_network_gateways_operations_async.py | 177 +- ...ent_virtual_network_peerings_operations.py | 44 +- ...rtual_network_peerings_operations_async.py | 44 +- ...agement_virtual_network_taps_operations.py | 44 +- ...t_virtual_network_taps_operations_async.py | 44 +- ..._management_virtual_networks_operations.py | 76 +- ...ement_virtual_networks_operations_async.py | 76 +- ...ment_virtual_router_peerings_operations.py | 16 +- ...irtual_router_peerings_operations_async.py | 16 +- ...k_management_virtual_routers_operations.py | 20 +- ...gement_virtual_routers_operations_async.py | 20 +- ...work_management_virtual_wans_operations.py | 24 +- ...anagement_virtual_wans_operations_async.py | 24 +- ...k_management_vpn_connections_operations.py | 24 +- ...gement_vpn_connections_operations_async.py | 24 +- ...work_management_vpn_gateways_operations.py | 36 +- ...anagement_vpn_gateways_operations_async.py | 36 +- ...agement_vpn_link_connections_operations.py | 28 +- ...t_vpn_link_connections_operations_async.py | 28 +- ..._associated_with_virtual_wan_operations.py | 4 +- ...iated_with_virtual_wan_operations_async.py | 4 +- ...nt_vpn_server_configurations_operations.py | 31 +- ..._server_configurations_operations_async.py | 35 +- ...nt_vpn_site_link_connections_operations.py | 4 +- ..._site_link_connections_operations_async.py | 4 +- ...rk_management_vpn_site_links_operations.py | 8 +- ...agement_vpn_site_links_operations_async.py | 8 +- ...ment_vpn_sites_configuration_operations.py | 4 +- ...pn_sites_configuration_operations_async.py | 4 +- ...network_management_vpn_sites_operations.py | 31 +- ...k_management_vpn_sites_operations_async.py | 31 +- ...pplication_firewall_policies_operations.py | 149 +- ...tion_firewall_policies_operations_async.py | 149 +- ...rk_management_web_categories_operations.py | 8 +- ...agement_web_categories_operations_async.py | 8 +- sdk/network/azure-mgmt-network/setup.py | 8 +- ...> test_cli_mgmt_network_available_test.py} | 0 ....py => test_cli_mgmt_network_base_test.py} | 0 ..._cli_mgmt_network_endpoint_policy_test.py} | 0 ...=> test_cli_mgmt_network_endpoint_test.py} | 0 ...=> test_cli_mgmt_network_firewall_test.py} | 0 ...est_cli_mgmt_network_ip_addresses_test.py} | 0 ...ip.py => test_cli_mgmt_network_ip_test.py} | 0 ...st_cli_mgmt_network_load_balancer_test.py} | 0 ...t.py => test_cli_mgmt_network_nat_test.py} | 0 ...> test_cli_mgmt_network_operation_test.py} | 0 ...est_cli_mgmt_network_route_filter_test.py} | 0 ...test_cli_mgmt_network_route_table_test.py} | 0 ... => test_cli_mgmt_network_wan_hub_test.py} | 0 ... => test_cli_mgmt_network_watcher_test.py} | 4 +- ...k_web_application_firewall_policy_test.py} | 0 ...ration.py => test_mixin_operation_test.py} | 0 ...ent_bastion_hosts_operations_async_test.py | 36 + ...anagement_bastion_hosts_operations_test.py | 35 + ...rvice_communities_operations_async_test.py | 27 + ...bgp_service_communities_operations_test.py | 26 + ..._protection_plans_operations_async_test.py | 36 + ...t_ddos_protection_plans_operations_test.py | 35 + ...e_ports_locations_operations_async_test.py | 27 + ...s_route_ports_locations_operations_test.py | 26 + ...press_route_ports_operations_async_test.py | 36 + ...ent_express_route_ports_operations_test.py | 35 + ...er_ports_location_operations_async_test.py | 27 + ...provider_ports_location_operations_test.py | 26 + ...service_providers_operations_async_test.py | 27 + ...route_service_providers_operations_test.py | 26 + ...nt_ip_allocations_operations_async_test.py | 36 + ...nagement_ip_allocations_operations_test.py | 35 + ...agement_ip_groups_operations_async_test.py | 36 + ...rk_management_ip_groups_operations_test.py | 35 + ...irtual_appliances_operations_async_test.py | 36 + ...work_virtual_appliances_operations_test.py | 35 + ..._p2_svpn_gateways_operations_async_test.py | 36 + ...gement_p2_svpn_gateways_operations_test.py | 35 + ...ent_route_filters_operations_async_test.py | 36 + ...anagement_route_filters_operations_test.py | 35 + ...partner_providers_operations_async_test.py | 36 + ...urity_partner_providers_operations_test.py | 35 + ...endpoint_policies_operations_async_test.py | 36 + ...rvice_endpoint_policies_operations_test.py | 35 + ...nager_connections_operations_async_test.py | 27 + ...ork_manager_connections_operations_test.py | 26 + ...al_appliance_skus_operations_async_test.py | 27 + ..._virtual_appliance_skus_operations_test.py | 26 + ...ment_virtual_hubs_operations_async_test.py | 36 + ...management_virtual_hubs_operations_test.py | 35 + ...t_virtual_routers_operations_async_test.py | 36 + ...agement_virtual_routers_operations_test.py | 35 + ...ment_virtual_wans_operations_async_test.py | 36 + ...management_virtual_wans_operations_test.py | 35 + ...ment_vpn_gateways_operations_async_test.py | 36 + ...management_vpn_gateways_operations_test.py | 35 + ...er_configurations_operations_async_test.py | 36 + ...n_server_configurations_operations_test.py | 35 + ...agement_vpn_sites_operations_async_test.py | 36 + ...rk_management_vpn_sites_operations_test.py | 35 + 1137 files changed, 37185 insertions(+), 19693 deletions(-) create mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py rename sdk/network/azure-mgmt-network/generated_samples/{network_manager_default_admin_rule_put.py => reachability_analysis_intent_get.py} (77%) create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py create mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations_async.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations_async.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations_async.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations_async.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations.py create mode 100644 sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations_async.py rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_available.py => test_cli_mgmt_network_available_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_base.py => test_cli_mgmt_network_base_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_endpoint_policy.py => test_cli_mgmt_network_endpoint_policy_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_endpoint.py => test_cli_mgmt_network_endpoint_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_firewall.py => test_cli_mgmt_network_firewall_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_ip_addresses.py => test_cli_mgmt_network_ip_addresses_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_ip.py => test_cli_mgmt_network_ip_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_load_balancer.py => test_cli_mgmt_network_load_balancer_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_nat.py => test_cli_mgmt_network_nat_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_operation.py => test_cli_mgmt_network_operation_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_route_filter.py => test_cli_mgmt_network_route_filter_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_route_table.py => test_cli_mgmt_network_route_table_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_wan_hub.py => test_cli_mgmt_network_wan_hub_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_watcher.py => test_cli_mgmt_network_watcher_test.py} (99%) rename sdk/network/azure-mgmt-network/tests/{test_cli_mgmt_network_web_application_firewall_policy.py => test_cli_mgmt_network_web_application_firewall_policy_test.py} (100%) rename sdk/network/azure-mgmt-network/tests/{test_mixin_operation.py => test_mixin_operation_test.py} (100%) create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_async_test.py create mode 100644 sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_test.py diff --git a/sdk/network/azure-mgmt-network/CHANGELOG.md b/sdk/network/azure-mgmt-network/CHANGELOG.md index 593828a8fd33..f41d09532c60 100644 --- a/sdk/network/azure-mgmt-network/CHANGELOG.md +++ b/sdk/network/azure-mgmt-network/CHANGELOG.md @@ -1,5 +1,82 @@ # Release History +## 28.1.0 (2024-12-20) + +### Features Added + + - Client `NetworkManagementClient` added operation group `ipam_pools` + - Client `NetworkManagementClient` added operation group `static_cidrs` + - Client `NetworkManagementClient` added operation group `reachability_analysis_intents` + - Client `NetworkManagementClient` added operation group `reachability_analysis_runs` + - Client `NetworkManagementClient` added operation group `verifier_workspaces` + - Enum `AddressPrefixType` added member `NETWORK_GROUP` + - Model `AddressSpace` added property `ipam_pool_prefix_allocations` + - Model `BastionHost` added property `enable_private_only_bastion` + - Enum `FirewallPolicyIDPSSignatureDirection` added member `FIVE` + - Model `NetworkInterface` added property `default_outbound_connectivity_enabled` + - Enum `ProvisioningState` added member `CANCELED` + - Enum `ProvisioningState` added member `CREATING` + - Model `SecurityAdminConfiguration` added property `network_group_address_space_aggregation_option` + - Model `Subnet` added property `ipam_pool_prefix_allocations` + - Added enum `AddressSpaceAggregationOption` + - Added model `CommonErrorAdditionalInfo` + - Added model `CommonErrorDetail` + - Added model `CommonErrorResponse` + - Added model `CommonProxyResource` + - Added model `CommonResource` + - Added model `CommonTrackedResource` + - Added model `ExpressRouteFailoverCircuitResourceDetails` + - Added model `ExpressRouteFailoverConnectionResourceDetails` + - Added model `ExpressRouteFailoverRedundantRoute` + - Added model `ExpressRouteFailoverSingleTestDetails` + - Added model `ExpressRouteFailoverStopApiParameters` + - Added model `ExpressRouteFailoverTestDetails` + - Added model `FailoverConnectionDetails` + - Added enum `FailoverConnectionStatus` + - Added enum `FailoverTestStatus` + - Added enum `FailoverTestStatusForSingleTest` + - Added enum `FailoverTestType` + - Added model `IPTraffic` + - Added model `IntentContent` + - Added enum `IpType` + - Added model `IpamPool` + - Added model `IpamPoolList` + - Added model `IpamPoolPrefixAllocation` + - Added model `IpamPoolProperties` + - Added model `IpamPoolUpdate` + - Added model `IpamPoolUpdateProperties` + - Added model `LoadBalancerHealthPerRule` + - Added model `LoadBalancerHealthPerRulePerBackendAddress` + - Added enum `NetworkProtocol` + - Added model `PoolAssociation` + - Added model `PoolAssociationList` + - Added model `PoolUsage` + - Added model `ReachabilityAnalysisIntent` + - Added model `ReachabilityAnalysisIntentListResult` + - Added model `ReachabilityAnalysisIntentProperties` + - Added model `ReachabilityAnalysisRun` + - Added model `ReachabilityAnalysisRunListResult` + - Added model `ReachabilityAnalysisRunProperties` + - Added model `ResourceBasics` + - Added model `StaticCidr` + - Added model `StaticCidrList` + - Added model `StaticCidrProperties` + - Added model `VerifierWorkspace` + - Added model `VerifierWorkspaceListResult` + - Added model `VerifierWorkspaceProperties` + - Added model `VerifierWorkspaceUpdate` + - Added model `VerifierWorkspaceUpdateProperties` + - Operation group `LoadBalancerLoadBalancingRulesOperations` added method `begin_health` + - Operation group `VirtualNetworkGatewaysOperations` added method `begin_get_failover_all_test_details` + - Operation group `VirtualNetworkGatewaysOperations` added method `begin_get_failover_single_test_details` + - Operation group `VirtualNetworkGatewaysOperations` added method `begin_start_express_route_site_failover_simulation` + - Operation group `VirtualNetworkGatewaysOperations` added method `begin_stop_express_route_site_failover_simulation` + - Added operation group `IpamPoolsOperations` + - Added operation group `ReachabilityAnalysisIntentsOperations` + - Added operation group `ReachabilityAnalysisRunsOperations` + - Added operation group `StaticCidrsOperations` + - Added operation group `VerifierWorkspacesOperations` + ## 28.0.0 (2024-11-01) ### Breaking Changes diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/__init__.py index 22f85294640f..b277066d3e7d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._network_management_client import NetworkManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._network_management_client import NetworkManagementClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "NetworkManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_configuration.py index 3966cf6871ed..7e2c75541d32 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_configuration.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class NetworkManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NetworkManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NetworkManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py index 6a1ef19d2733..25838bbbedb3 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -73,6 +74,7 @@ InboundSecurityRuleOperations, IpAllocationsOperations, IpGroupsOperations, + IpamPoolsOperations, LoadBalancerBackendAddressPoolsOperations, LoadBalancerFrontendIPConfigurationsOperations, LoadBalancerLoadBalancingRulesOperations, @@ -108,6 +110,8 @@ PrivateLinkServicesOperations, PublicIPAddressesOperations, PublicIPPrefixesOperations, + ReachabilityAnalysisIntentsOperations, + ReachabilityAnalysisRunsOperations, ResourceNavigationLinksOperations, RouteFilterRulesOperations, RouteFiltersOperations, @@ -129,10 +133,12 @@ ServiceEndpointPolicyDefinitionsOperations, ServiceTagInformationOperations, ServiceTagsOperations, + StaticCidrsOperations, StaticMembersOperations, SubnetsOperations, SubscriptionNetworkManagerConnectionsOperations, UsagesOperations, + VerifierWorkspacesOperations, VipSwapOperations, VirtualApplianceSitesOperations, VirtualApplianceSkusOperations, @@ -164,7 +170,6 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -295,6 +300,10 @@ class NetworkManagementClient( FirewallPolicyRuleCollectionGroupDraftsOperations operations :vartype firewall_policy_rule_collection_group_drafts: azure.mgmt.network.operations.FirewallPolicyRuleCollectionGroupDraftsOperations + :ivar ipam_pools: IpamPoolsOperations operations + :vartype ipam_pools: azure.mgmt.network.operations.IpamPoolsOperations + :ivar static_cidrs: StaticCidrsOperations operations + :vartype static_cidrs: azure.mgmt.network.operations.StaticCidrsOperations :ivar ip_allocations: IpAllocationsOperations operations :vartype ip_allocations: azure.mgmt.network.operations.IpAllocationsOperations :ivar ip_groups: IpGroupsOperations operations @@ -356,6 +365,15 @@ class NetworkManagementClient( :vartype network_groups: azure.mgmt.network.operations.NetworkGroupsOperations :ivar static_members: StaticMembersOperations operations :vartype static_members: azure.mgmt.network.operations.StaticMembersOperations + :ivar network_manager_routing_configurations: NetworkManagerRoutingConfigurationsOperations + operations + :vartype network_manager_routing_configurations: + azure.mgmt.network.operations.NetworkManagerRoutingConfigurationsOperations + :ivar routing_rule_collections: RoutingRuleCollectionsOperations operations + :vartype routing_rule_collections: + azure.mgmt.network.operations.RoutingRuleCollectionsOperations + :ivar routing_rules: RoutingRulesOperations operations + :vartype routing_rules: azure.mgmt.network.operations.RoutingRulesOperations :ivar scope_connections: ScopeConnectionsOperations operations :vartype scope_connections: azure.mgmt.network.operations.ScopeConnectionsOperations :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations @@ -373,15 +391,6 @@ class NetworkManagementClient( azure.mgmt.network.operations.SecurityUserRuleCollectionsOperations :ivar security_user_rules: SecurityUserRulesOperations operations :vartype security_user_rules: azure.mgmt.network.operations.SecurityUserRulesOperations - :ivar network_manager_routing_configurations: NetworkManagerRoutingConfigurationsOperations - operations - :vartype network_manager_routing_configurations: - azure.mgmt.network.operations.NetworkManagerRoutingConfigurationsOperations - :ivar routing_rule_collections: RoutingRuleCollectionsOperations operations - :vartype routing_rule_collections: - azure.mgmt.network.operations.RoutingRuleCollectionsOperations - :ivar routing_rules: RoutingRulesOperations operations - :vartype routing_rules: azure.mgmt.network.operations.RoutingRulesOperations :ivar network_profiles: NetworkProfilesOperations operations :vartype network_profiles: azure.mgmt.network.operations.NetworkProfilesOperations :ivar network_security_groups: NetworkSecurityGroupsOperations operations @@ -390,6 +399,14 @@ class NetworkManagementClient( :vartype security_rules: azure.mgmt.network.operations.SecurityRulesOperations :ivar default_security_rules: DefaultSecurityRulesOperations operations :vartype default_security_rules: azure.mgmt.network.operations.DefaultSecurityRulesOperations + :ivar reachability_analysis_intents: ReachabilityAnalysisIntentsOperations operations + :vartype reachability_analysis_intents: + azure.mgmt.network.operations.ReachabilityAnalysisIntentsOperations + :ivar reachability_analysis_runs: ReachabilityAnalysisRunsOperations operations + :vartype reachability_analysis_runs: + azure.mgmt.network.operations.ReachabilityAnalysisRunsOperations + :ivar verifier_workspaces: VerifierWorkspacesOperations operations + :vartype verifier_workspaces: azure.mgmt.network.operations.VerifierWorkspacesOperations :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations :vartype network_virtual_appliances: azure.mgmt.network.operations.NetworkVirtualAppliancesOperations @@ -706,6 +723,8 @@ def __init__( self.firewall_policy_rule_collection_group_drafts = FirewallPolicyRuleCollectionGroupDraftsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.ipam_pools = IpamPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.static_cidrs = StaticCidrsOperations(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) @@ -760,6 +779,13 @@ def __init__( ) self.network_groups = NetworkGroupsOperations(self._client, self._config, self._serialize, self._deserialize) self.static_members = StaticMembersOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_manager_routing_configurations = NetworkManagerRoutingConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routing_rule_collections = RoutingRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routing_rules = RoutingRulesOperations(self._client, self._config, self._serialize, self._deserialize) self.scope_connections = ScopeConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -779,13 +805,6 @@ def __init__( self.security_user_rules = SecurityUserRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.network_manager_routing_configurations = NetworkManagerRoutingConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.routing_rule_collections = RoutingRuleCollectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.routing_rules = RoutingRulesOperations(self._client, self._config, self._serialize, self._deserialize) self.network_profiles = NetworkProfilesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -796,6 +815,15 @@ def __init__( self.default_security_rules = DefaultSecurityRulesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.reachability_analysis_intents = ReachabilityAnalysisIntentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.reachability_analysis_runs = ReachabilityAnalysisRunsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.verifier_workspaces = VerifierWorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.network_virtual_appliances = NetworkVirtualAppliancesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py index 8139854b97bb..ce17d1798ce7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -24,7 +25,6 @@ # # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -52,7 +52,6 @@ MutableMapping, Type, List, - Mapping, ) try: @@ -91,6 +90,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +113,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -155,6 +156,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -184,15 +190,30 @@ class UTC(datetime.tzinfo): """Time Zone info for handling UTC""" def utcoffset(self, dt): - """UTF offset for UTC is 0.""" + """UTF offset for UTC is 0. + + :param datetime.datetime dt: The datetime + :returns: The offset + :rtype: datetime.timedelta + """ return datetime.timedelta(0) def tzname(self, dt): - """Timestamp representation.""" + """Timestamp representation. + + :param datetime.datetime dt: The datetime + :returns: The timestamp representation + :rtype: str + """ return "Z" def dst(self, dt): - """No daylight saving for UTC.""" + """No daylight saving for UTC. + + :param datetime.datetime dt: The datetime + :returns: The daylight saving time + :rtype: datetime.timedelta + """ return datetime.timedelta(hours=1) @@ -206,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore :param datetime.timedelta offset: offset in timedelta format """ - def __init__(self, offset): + def __init__(self, offset) -> None: self.__offset = offset def utcoffset(self, dt): @@ -235,24 +256,26 @@ def __getinitargs__(self): _FLATTEN = re.compile(r"(? None: self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -300,13 +330,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -326,7 +366,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -346,7 +390,9 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, @@ -380,12 +426,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -395,7 +444,7 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @@ -408,6 +457,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model :raises: DeserializationError if something went wrong + :rtype: ModelType """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @@ -426,9 +476,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model :raises: DeserializationError if something went wrong + :rtype: ModelType """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -448,21 +500,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access return result @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -501,11 +557,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer(object): # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -540,7 +598,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -560,13 +618,16 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None): self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict :raises: SerializationError if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -592,12 +653,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": @@ -633,7 +696,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -664,17 +728,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs): except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise SerializationError(msg) from err - else: - return serialized + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict :raises: SerializationError if serialization fails. :raises: ValueError if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -703,7 +767,7 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: raise SerializationError("Unable to build a model: " + str(err)) from err @@ -712,9 +776,11 @@ def body(self, data, data_type, **kwargs): def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str + :returns: The serialized URL path :raises: TypeError if serialization fails. :raises: ValueError if data is None """ @@ -728,21 +794,20 @@ def url(self, name, data, data_type, **kwargs): output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :keyword bool skip_quote: Whether to skip quote the serialized result. - Defaults to False. :rtype: str, list :raises: TypeError if serialization fails. :raises: ValueError if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator @@ -759,19 +824,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str :raises: TypeError if serialization fails. :raises: ValueError if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -780,21 +846,20 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None :raises: AttributeError if required data is None. :raises: ValueError if data is None :raises: SerializationError if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") @@ -805,7 +870,7 @@ def serialize_data(self, data, data_type, **kwargs): if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class @@ -821,11 +886,10 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." raise SerializationError(msg.format(data, data_type)) from err - else: - return self._serialize(data, **kwargs) + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -841,23 +905,26 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + return eval(data_type)(data) # nosec # pylint: disable=eval-used @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -871,8 +938,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -882,15 +948,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. - :keyword bool do_quote: Whether to quote the serialized result of each iterable element. Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -945,9 +1009,8 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} @@ -971,7 +1034,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -979,6 +1042,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -1003,7 +1067,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1034,56 +1098,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1091,11 +1160,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1105,30 +1175,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str :raises: TypeError if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1141,12 +1213,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str :raises: SerializationError if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1172,13 +1245,14 @@ def serialize_iso(attr, **kwargs): raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int :raises: SerializationError if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1186,11 +1260,11 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data @@ -1211,7 +1285,9 @@ def rest_key_extractor(attr, attr_desc, data): return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1232,17 +1308,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1279,7 +1367,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1331,22 +1419,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1363,9 +1450,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1403,11 +1490,12 @@ def __call__(self, target_obj, response_data, content_type=None): :param str content_type: Swagger "produces" if available. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree @@ -1416,12 +1504,13 @@ def _deserialize(self, target_obj, data): :param object data: Object to deserialize. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1440,13 +1529,13 @@ def _deserialize(self, target_obj, data): if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1476,9 +1565,8 @@ def _deserialize(self, target_obj, data): except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore raise DeserializationError(msg) from err - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1505,6 +1593,8 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None @@ -1516,7 +1606,7 @@ def _classify_target(self, target, data): return target, target try: - target = target._classify(data, self.dependencies) # type: ignore + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1531,10 +1621,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1552,10 +1644,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1579,14 +1673,21 @@ def _unpack_content(raw_data, content_type=None): def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + ] + const = [ + k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: @@ -1596,7 +1697,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None): return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1605,15 +1706,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1627,7 +1729,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1647,14 +1753,14 @@ def deserialize_data(self, data, data_type): msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) raise DeserializationError(msg) from err - else: - return self._deserialize(obj_type, data) + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1671,6 +1777,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1681,11 +1788,12 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict :raises: TypeError if non-builtin datatype encountered. """ @@ -1720,11 +1828,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1732,6 +1839,7 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool :raises: TypeError if string format is not valid. """ @@ -1743,24 +1851,23 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, str): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + return eval(data_type)(attr) # nosec # pylint: disable=eval-used @staticmethod def deserialize_unicode(data): @@ -1768,6 +1875,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1781,8 +1889,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1794,6 +1901,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1804,9 +1912,9 @@ def deserialize_enum(data, enum_obj): # Workaround. We might consider remove it in the future. try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1822,6 +1930,7 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray :raises: TypeError if string format invalid. """ @@ -1834,6 +1943,7 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray :raises: TypeError if string format invalid. """ @@ -1849,8 +1959,9 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal + :return: Deserialized decimal :raises: DeserializationError if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text @@ -1865,6 +1976,7 @@ def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int :raises: ValueError if string format invalid. """ @@ -1877,6 +1989,7 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta :raises: DeserializationError if string format invalid. """ @@ -1887,14 +2000,14 @@ def deserialize_duration(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." raise DeserializationError(msg) from err - else: - return duration + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date :raises: DeserializationError if string format invalid. """ @@ -1910,6 +2023,7 @@ def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time :raises: DeserializationError if string format invalid. """ @@ -1924,6 +2038,7 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime :raises: DeserializationError if string format invalid. """ @@ -1939,14 +2054,14 @@ def deserialize_rfc(attr): except ValueError as err: msg = "Cannot deserialize to rfc datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime :raises: DeserializationError if string format invalid. """ @@ -1976,8 +2091,7 @@ def deserialize_iso(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_unix(attr): @@ -1985,6 +2099,7 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime :raises: DeserializationError if format invalid """ @@ -1996,5 +2111,4 @@ def deserialize_unix(attr): except ValueError as err: msg = "Cannot deserialize to unix datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_vendor.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_vendor.py index a8238c13d7a8..b0eff66bf999 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_vendor.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NetworkManagementClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py index 261dd57e8f08..e341f9689021 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "28.0.0" +VERSION = "28.1.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/__init__.py index 3e9fedfa0ae0..6fcd96aec807 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._network_management_client import NetworkManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._network_management_client import NetworkManagementClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "NetworkManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_configuration.py index 9c50c4b10068..7cac8e87b6b1 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_configuration.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class NetworkManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NetworkManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NetworkManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py index 42d26d80d6fc..98fc6e35e3f8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -73,6 +74,7 @@ InboundSecurityRuleOperations, IpAllocationsOperations, IpGroupsOperations, + IpamPoolsOperations, LoadBalancerBackendAddressPoolsOperations, LoadBalancerFrontendIPConfigurationsOperations, LoadBalancerLoadBalancingRulesOperations, @@ -108,6 +110,8 @@ PrivateLinkServicesOperations, PublicIPAddressesOperations, PublicIPPrefixesOperations, + ReachabilityAnalysisIntentsOperations, + ReachabilityAnalysisRunsOperations, ResourceNavigationLinksOperations, RouteFilterRulesOperations, RouteFiltersOperations, @@ -129,10 +133,12 @@ ServiceEndpointPolicyDefinitionsOperations, ServiceTagInformationOperations, ServiceTagsOperations, + StaticCidrsOperations, StaticMembersOperations, SubnetsOperations, SubscriptionNetworkManagerConnectionsOperations, UsagesOperations, + VerifierWorkspacesOperations, VipSwapOperations, VirtualApplianceSitesOperations, VirtualApplianceSkusOperations, @@ -164,7 +170,6 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -298,6 +303,10 @@ class NetworkManagementClient( FirewallPolicyRuleCollectionGroupDraftsOperations operations :vartype firewall_policy_rule_collection_group_drafts: azure.mgmt.network.aio.operations.FirewallPolicyRuleCollectionGroupDraftsOperations + :ivar ipam_pools: IpamPoolsOperations operations + :vartype ipam_pools: azure.mgmt.network.aio.operations.IpamPoolsOperations + :ivar static_cidrs: StaticCidrsOperations operations + :vartype static_cidrs: azure.mgmt.network.aio.operations.StaticCidrsOperations :ivar ip_allocations: IpAllocationsOperations operations :vartype ip_allocations: azure.mgmt.network.aio.operations.IpAllocationsOperations :ivar ip_groups: IpGroupsOperations operations @@ -360,6 +369,15 @@ class NetworkManagementClient( :vartype network_groups: azure.mgmt.network.aio.operations.NetworkGroupsOperations :ivar static_members: StaticMembersOperations operations :vartype static_members: azure.mgmt.network.aio.operations.StaticMembersOperations + :ivar network_manager_routing_configurations: NetworkManagerRoutingConfigurationsOperations + operations + :vartype network_manager_routing_configurations: + azure.mgmt.network.aio.operations.NetworkManagerRoutingConfigurationsOperations + :ivar routing_rule_collections: RoutingRuleCollectionsOperations operations + :vartype routing_rule_collections: + azure.mgmt.network.aio.operations.RoutingRuleCollectionsOperations + :ivar routing_rules: RoutingRulesOperations operations + :vartype routing_rules: azure.mgmt.network.aio.operations.RoutingRulesOperations :ivar scope_connections: ScopeConnectionsOperations operations :vartype scope_connections: azure.mgmt.network.aio.operations.ScopeConnectionsOperations :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations @@ -378,15 +396,6 @@ class NetworkManagementClient( azure.mgmt.network.aio.operations.SecurityUserRuleCollectionsOperations :ivar security_user_rules: SecurityUserRulesOperations operations :vartype security_user_rules: azure.mgmt.network.aio.operations.SecurityUserRulesOperations - :ivar network_manager_routing_configurations: NetworkManagerRoutingConfigurationsOperations - operations - :vartype network_manager_routing_configurations: - azure.mgmt.network.aio.operations.NetworkManagerRoutingConfigurationsOperations - :ivar routing_rule_collections: RoutingRuleCollectionsOperations operations - :vartype routing_rule_collections: - azure.mgmt.network.aio.operations.RoutingRuleCollectionsOperations - :ivar routing_rules: RoutingRulesOperations operations - :vartype routing_rules: azure.mgmt.network.aio.operations.RoutingRulesOperations :ivar network_profiles: NetworkProfilesOperations operations :vartype network_profiles: azure.mgmt.network.aio.operations.NetworkProfilesOperations :ivar network_security_groups: NetworkSecurityGroupsOperations operations @@ -397,6 +406,14 @@ class NetworkManagementClient( :ivar default_security_rules: DefaultSecurityRulesOperations operations :vartype default_security_rules: azure.mgmt.network.aio.operations.DefaultSecurityRulesOperations + :ivar reachability_analysis_intents: ReachabilityAnalysisIntentsOperations operations + :vartype reachability_analysis_intents: + azure.mgmt.network.aio.operations.ReachabilityAnalysisIntentsOperations + :ivar reachability_analysis_runs: ReachabilityAnalysisRunsOperations operations + :vartype reachability_analysis_runs: + azure.mgmt.network.aio.operations.ReachabilityAnalysisRunsOperations + :ivar verifier_workspaces: VerifierWorkspacesOperations operations + :vartype verifier_workspaces: azure.mgmt.network.aio.operations.VerifierWorkspacesOperations :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations :vartype network_virtual_appliances: azure.mgmt.network.aio.operations.NetworkVirtualAppliancesOperations @@ -722,6 +739,8 @@ def __init__( self.firewall_policy_rule_collection_group_drafts = FirewallPolicyRuleCollectionGroupDraftsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.ipam_pools = IpamPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.static_cidrs = StaticCidrsOperations(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) @@ -776,6 +795,13 @@ def __init__( ) self.network_groups = NetworkGroupsOperations(self._client, self._config, self._serialize, self._deserialize) self.static_members = StaticMembersOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_manager_routing_configurations = NetworkManagerRoutingConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routing_rule_collections = RoutingRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routing_rules = RoutingRulesOperations(self._client, self._config, self._serialize, self._deserialize) self.scope_connections = ScopeConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -795,13 +821,6 @@ def __init__( self.security_user_rules = SecurityUserRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.network_manager_routing_configurations = NetworkManagerRoutingConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.routing_rule_collections = RoutingRuleCollectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.routing_rules = RoutingRulesOperations(self._client, self._config, self._serialize, self._deserialize) self.network_profiles = NetworkProfilesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -812,6 +831,15 @@ def __init__( self.default_security_rules = DefaultSecurityRulesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.reachability_analysis_intents = ReachabilityAnalysisIntentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.reachability_analysis_runs = ReachabilityAnalysisRunsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.verifier_workspaces = VerifierWorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.network_virtual_appliances = NetworkVirtualAppliancesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_vendor.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_vendor.py index 98dff78269a5..081fc177ed3e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_vendor.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NetworkManagementClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/__init__.py index 4b81121ddaeb..a3eddedae9de 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/__init__.py @@ -5,152 +5,163 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ApplicationGatewaysOperations -from ._operations import ApplicationGatewayPrivateLinkResourcesOperations -from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations -from ._operations import ApplicationGatewayWafDynamicManifestsDefaultOperations -from ._operations import ApplicationGatewayWafDynamicManifestsOperations -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 VipSwapOperations -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 ExpressRouteProviderPortsLocationOperations -from ._operations import FirewallPoliciesOperations -from ._operations import FirewallPolicyRuleCollectionGroupsOperations -from ._operations import FirewallPolicyIdpsSignaturesOperations -from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations -from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations -from ._operations import FirewallPolicyDraftsOperations -from ._operations import FirewallPolicyDeploymentsOperations -from ._operations import FirewallPolicyRuleCollectionGroupDraftsOperations -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 NetworkManagersOperations -from ._operations import NetworkManagerCommitsOperations -from ._operations import NetworkManagerDeploymentStatusOperations -from ._operations import SubscriptionNetworkManagerConnectionsOperations -from ._operations import ManagementGroupNetworkManagerConnectionsOperations -from ._operations import ConnectivityConfigurationsOperations -from ._operations import NetworkGroupsOperations -from ._operations import StaticMembersOperations -from ._operations import ScopeConnectionsOperations -from ._operations import SecurityAdminConfigurationsOperations -from ._operations import AdminRuleCollectionsOperations -from ._operations import AdminRulesOperations -from ._operations import SecurityUserConfigurationsOperations -from ._operations import SecurityUserRuleCollectionsOperations -from ._operations import SecurityUserRulesOperations -from ._operations import NetworkManagerRoutingConfigurationsOperations -from ._operations import RoutingRuleCollectionsOperations -from ._operations import RoutingRulesOperations -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 RouteMapsOperations -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 NetworkVirtualApplianceConnectionsOperations -from ._operations import VirtualHubBgpConnectionOperations -from ._operations import VirtualHubBgpConnectionsOperations -from ._operations import VirtualHubIpConfigurationOperations -from ._operations import HubRouteTablesOperations -from ._operations import RoutingIntentOperations -from ._operations import WebApplicationFirewallPoliciesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ApplicationGatewaysOperations # type: ignore +from ._operations import ApplicationGatewayPrivateLinkResourcesOperations # type: ignore +from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations # type: ignore +from ._operations import ApplicationGatewayWafDynamicManifestsDefaultOperations # type: ignore +from ._operations import ApplicationGatewayWafDynamicManifestsOperations # type: ignore +from ._operations import ApplicationSecurityGroupsOperations # type: ignore +from ._operations import AvailableDelegationsOperations # type: ignore +from ._operations import AvailableResourceGroupDelegationsOperations # type: ignore +from ._operations import AvailableServiceAliasesOperations # type: ignore +from ._operations import AzureFirewallsOperations # type: ignore +from ._operations import AzureFirewallFqdnTagsOperations # type: ignore +from ._operations import WebCategoriesOperations # type: ignore +from ._operations import BastionHostsOperations # type: ignore +from ._operations import NetworkManagementClientOperationsMixin # type: ignore +from ._operations import NetworkInterfacesOperations # type: ignore +from ._operations import PublicIPAddressesOperations # type: ignore +from ._operations import VipSwapOperations # type: ignore +from ._operations import CustomIPPrefixesOperations # type: ignore +from ._operations import DdosCustomPoliciesOperations # type: ignore +from ._operations import DdosProtectionPlansOperations # type: ignore +from ._operations import DscpConfigurationOperations # type: ignore +from ._operations import AvailableEndpointServicesOperations # type: ignore +from ._operations import ExpressRouteCircuitAuthorizationsOperations # type: ignore +from ._operations import ExpressRouteCircuitPeeringsOperations # type: ignore +from ._operations import ExpressRouteCircuitConnectionsOperations # type: ignore +from ._operations import PeerExpressRouteCircuitConnectionsOperations # type: ignore +from ._operations import ExpressRouteCircuitsOperations # type: ignore +from ._operations import ExpressRouteServiceProvidersOperations # type: ignore +from ._operations import ExpressRouteCrossConnectionsOperations # type: ignore +from ._operations import ExpressRouteCrossConnectionPeeringsOperations # type: ignore +from ._operations import ExpressRoutePortsLocationsOperations # type: ignore +from ._operations import ExpressRoutePortsOperations # type: ignore +from ._operations import ExpressRouteLinksOperations # type: ignore +from ._operations import ExpressRoutePortAuthorizationsOperations # type: ignore +from ._operations import ExpressRouteProviderPortsLocationOperations # type: ignore +from ._operations import FirewallPoliciesOperations # type: ignore +from ._operations import FirewallPolicyRuleCollectionGroupsOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations # type: ignore +from ._operations import FirewallPolicyDraftsOperations # type: ignore +from ._operations import FirewallPolicyDeploymentsOperations # type: ignore +from ._operations import FirewallPolicyRuleCollectionGroupDraftsOperations # type: ignore +from ._operations import IpamPoolsOperations # type: ignore +from ._operations import StaticCidrsOperations # type: ignore +from ._operations import IpAllocationsOperations # type: ignore +from ._operations import IpGroupsOperations # type: ignore +from ._operations import LoadBalancersOperations # type: ignore +from ._operations import LoadBalancerBackendAddressPoolsOperations # type: ignore +from ._operations import LoadBalancerFrontendIPConfigurationsOperations # type: ignore +from ._operations import InboundNatRulesOperations # type: ignore +from ._operations import LoadBalancerLoadBalancingRulesOperations # type: ignore +from ._operations import LoadBalancerOutboundRulesOperations # type: ignore +from ._operations import LoadBalancerNetworkInterfacesOperations # type: ignore +from ._operations import LoadBalancerProbesOperations # type: ignore +from ._operations import NatGatewaysOperations # type: ignore +from ._operations import NetworkInterfaceIPConfigurationsOperations # type: ignore +from ._operations import NetworkInterfaceLoadBalancersOperations # type: ignore +from ._operations import NetworkInterfaceTapConfigurationsOperations # type: ignore +from ._operations import NetworkManagersOperations # type: ignore +from ._operations import NetworkManagerCommitsOperations # type: ignore +from ._operations import NetworkManagerDeploymentStatusOperations # type: ignore +from ._operations import SubscriptionNetworkManagerConnectionsOperations # type: ignore +from ._operations import ManagementGroupNetworkManagerConnectionsOperations # type: ignore +from ._operations import ConnectivityConfigurationsOperations # type: ignore +from ._operations import NetworkGroupsOperations # type: ignore +from ._operations import StaticMembersOperations # type: ignore +from ._operations import NetworkManagerRoutingConfigurationsOperations # type: ignore +from ._operations import RoutingRuleCollectionsOperations # type: ignore +from ._operations import RoutingRulesOperations # type: ignore +from ._operations import ScopeConnectionsOperations # type: ignore +from ._operations import SecurityAdminConfigurationsOperations # type: ignore +from ._operations import AdminRuleCollectionsOperations # type: ignore +from ._operations import AdminRulesOperations # type: ignore +from ._operations import SecurityUserConfigurationsOperations # type: ignore +from ._operations import SecurityUserRuleCollectionsOperations # type: ignore +from ._operations import SecurityUserRulesOperations # type: ignore +from ._operations import NetworkProfilesOperations # type: ignore +from ._operations import NetworkSecurityGroupsOperations # type: ignore +from ._operations import SecurityRulesOperations # type: ignore +from ._operations import DefaultSecurityRulesOperations # type: ignore +from ._operations import ReachabilityAnalysisIntentsOperations # type: ignore +from ._operations import ReachabilityAnalysisRunsOperations # type: ignore +from ._operations import VerifierWorkspacesOperations # type: ignore +from ._operations import NetworkVirtualAppliancesOperations # type: ignore +from ._operations import VirtualApplianceSitesOperations # type: ignore +from ._operations import VirtualApplianceSkusOperations # type: ignore +from ._operations import InboundSecurityRuleOperations # type: ignore +from ._operations import NetworkWatchersOperations # type: ignore +from ._operations import PacketCapturesOperations # type: ignore +from ._operations import ConnectionMonitorsOperations # type: ignore +from ._operations import FlowLogsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import PrivateEndpointsOperations # type: ignore +from ._operations import AvailablePrivateEndpointTypesOperations # type: ignore +from ._operations import PrivateDnsZoneGroupsOperations # type: ignore +from ._operations import PrivateLinkServicesOperations # type: ignore +from ._operations import PublicIPPrefixesOperations # type: ignore +from ._operations import RouteFiltersOperations # type: ignore +from ._operations import RouteFilterRulesOperations # type: ignore +from ._operations import RouteTablesOperations # type: ignore +from ._operations import RoutesOperations # type: ignore +from ._operations import SecurityPartnerProvidersOperations # type: ignore +from ._operations import BgpServiceCommunitiesOperations # type: ignore +from ._operations import ServiceEndpointPoliciesOperations # type: ignore +from ._operations import ServiceEndpointPolicyDefinitionsOperations # type: ignore +from ._operations import ServiceTagsOperations # type: ignore +from ._operations import ServiceTagInformationOperations # type: ignore +from ._operations import UsagesOperations # type: ignore +from ._operations import VirtualNetworksOperations # type: ignore +from ._operations import SubnetsOperations # type: ignore +from ._operations import ResourceNavigationLinksOperations # type: ignore +from ._operations import ServiceAssociationLinksOperations # type: ignore +from ._operations import VirtualNetworkPeeringsOperations # type: ignore +from ._operations import VirtualNetworkGatewaysOperations # type: ignore +from ._operations import VirtualNetworkGatewayConnectionsOperations # type: ignore +from ._operations import LocalNetworkGatewaysOperations # type: ignore +from ._operations import VirtualNetworkGatewayNatRulesOperations # type: ignore +from ._operations import VirtualNetworkTapsOperations # type: ignore +from ._operations import VirtualRoutersOperations # type: ignore +from ._operations import VirtualRouterPeeringsOperations # type: ignore +from ._operations import VirtualWansOperations # type: ignore +from ._operations import VpnSitesOperations # type: ignore +from ._operations import VpnSiteLinksOperations # type: ignore +from ._operations import VpnSitesConfigurationOperations # type: ignore +from ._operations import VpnServerConfigurationsOperations # type: ignore +from ._operations import ConfigurationPolicyGroupsOperations # type: ignore +from ._operations import VirtualHubsOperations # type: ignore +from ._operations import RouteMapsOperations # type: ignore +from ._operations import HubVirtualNetworkConnectionsOperations # type: ignore +from ._operations import VpnGatewaysOperations # type: ignore +from ._operations import VpnLinkConnectionsOperations # type: ignore +from ._operations import VpnConnectionsOperations # type: ignore +from ._operations import VpnSiteLinkConnectionsOperations # type: ignore +from ._operations import NatRulesOperations # type: ignore +from ._operations import P2SVpnGatewaysOperations # type: ignore +from ._operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations # type: ignore +from ._operations import VirtualHubRouteTableV2SOperations # type: ignore +from ._operations import ExpressRouteGatewaysOperations # type: ignore +from ._operations import ExpressRouteConnectionsOperations # type: ignore +from ._operations import NetworkVirtualApplianceConnectionsOperations # type: ignore +from ._operations import VirtualHubBgpConnectionOperations # type: ignore +from ._operations import VirtualHubBgpConnectionsOperations # type: ignore +from ._operations import VirtualHubIpConfigurationOperations # type: ignore +from ._operations import HubRouteTablesOperations # type: ignore +from ._operations import RoutingIntentOperations # type: ignore +from ._operations import WebApplicationFirewallPoliciesOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -197,6 +208,8 @@ "FirewallPolicyDraftsOperations", "FirewallPolicyDeploymentsOperations", "FirewallPolicyRuleCollectionGroupDraftsOperations", + "IpamPoolsOperations", + "StaticCidrsOperations", "IpAllocationsOperations", "IpGroupsOperations", "LoadBalancersOperations", @@ -219,6 +232,9 @@ "ConnectivityConfigurationsOperations", "NetworkGroupsOperations", "StaticMembersOperations", + "NetworkManagerRoutingConfigurationsOperations", + "RoutingRuleCollectionsOperations", + "RoutingRulesOperations", "ScopeConnectionsOperations", "SecurityAdminConfigurationsOperations", "AdminRuleCollectionsOperations", @@ -226,13 +242,13 @@ "SecurityUserConfigurationsOperations", "SecurityUserRuleCollectionsOperations", "SecurityUserRulesOperations", - "NetworkManagerRoutingConfigurationsOperations", - "RoutingRuleCollectionsOperations", - "RoutingRulesOperations", "NetworkProfilesOperations", "NetworkSecurityGroupsOperations", "SecurityRulesOperations", "DefaultSecurityRulesOperations", + "ReachabilityAnalysisIntentsOperations", + "ReachabilityAnalysisRunsOperations", + "VerifierWorkspacesOperations", "NetworkVirtualAppliancesOperations", "VirtualApplianceSitesOperations", "VirtualApplianceSkusOperations", @@ -297,5 +313,5 @@ "RoutingIntentOperations", "WebApplicationFirewallPoliciesOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_operations.py index c5f61d4e7c6e..8b97e770b84c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -263,6 +262,13 @@ build_ip_groups_list_by_resource_group_request, build_ip_groups_list_request, build_ip_groups_update_groups_request, + build_ipam_pools_create_request, + build_ipam_pools_delete_request, + build_ipam_pools_get_pool_usage_request, + build_ipam_pools_get_request, + build_ipam_pools_list_associated_resources_request, + build_ipam_pools_list_request, + build_ipam_pools_update_request, build_load_balancer_backend_address_pools_create_or_update_request, build_load_balancer_backend_address_pools_delete_request, build_load_balancer_backend_address_pools_get_request, @@ -270,6 +276,7 @@ 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_health_request, build_load_balancer_load_balancing_rules_list_request, build_load_balancer_network_interfaces_list_request, build_load_balancer_outbound_rules_get_request, @@ -459,6 +466,14 @@ build_public_ip_prefixes_list_all_request, build_public_ip_prefixes_list_request, build_public_ip_prefixes_update_tags_request, + build_reachability_analysis_intents_create_request, + build_reachability_analysis_intents_delete_request, + build_reachability_analysis_intents_get_request, + build_reachability_analysis_intents_list_request, + build_reachability_analysis_runs_create_request, + build_reachability_analysis_runs_delete_request, + build_reachability_analysis_runs_get_request, + build_reachability_analysis_runs_list_request, build_resource_navigation_links_list_request, build_route_filter_rules_create_or_update_request, build_route_filter_rules_delete_request, @@ -539,6 +554,10 @@ build_service_endpoint_policy_definitions_list_by_resource_group_request, build_service_tag_information_list_request, build_service_tags_list_request, + build_static_cidrs_create_request, + build_static_cidrs_delete_request, + build_static_cidrs_get_request, + build_static_cidrs_list_request, build_static_members_create_or_update_request, build_static_members_delete_request, build_static_members_get_request, @@ -554,6 +573,11 @@ build_subscription_network_manager_connections_get_request, build_subscription_network_manager_connections_list_request, build_usages_list_request, + build_verifier_workspaces_create_request, + build_verifier_workspaces_delete_request, + build_verifier_workspaces_get_request, + build_verifier_workspaces_list_request, + build_verifier_workspaces_update_request, build_vip_swap_create_request, build_vip_swap_get_request, build_vip_swap_list_request, @@ -609,6 +633,8 @@ build_virtual_network_gateways_generatevpnclientpackage_request, build_virtual_network_gateways_get_advertised_routes_request, build_virtual_network_gateways_get_bgp_peer_status_request, + build_virtual_network_gateways_get_failover_all_test_details_request, + build_virtual_network_gateways_get_failover_single_test_details_request, build_virtual_network_gateways_get_learned_routes_request, build_virtual_network_gateways_get_request, build_virtual_network_gateways_get_vpn_profile_package_url_request, @@ -619,7 +645,9 @@ build_virtual_network_gateways_reset_request, build_virtual_network_gateways_reset_vpn_client_shared_key_request, build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request, + build_virtual_network_gateways_start_express_route_site_failover_simulation_request, build_virtual_network_gateways_start_packet_capture_request, + build_virtual_network_gateways_stop_express_route_site_failover_simulation_request, build_virtual_network_gateways_stop_packet_capture_request, build_virtual_network_gateways_supported_vpn_devices_request, build_virtual_network_gateways_update_tags_request, @@ -710,7 +738,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -737,7 +765,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, application_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -748,7 +776,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_delete_request( @@ -801,7 +829,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -854,7 +882,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ApplicationGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -865,7 +893,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) _request = build_application_gateways_get_request( @@ -903,7 +931,7 @@ async def _create_or_update_initial( parameters: Union[_models.ApplicationGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,7 +942,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1043,7 +1071,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1163,7 +1191,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ApplicationGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1202,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) @@ -1230,10 +1258,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1294,10 +1322,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.ApplicationGateway"] _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1349,7 +1377,7 @@ async def get_next(next_link=None): async def _start_initial( self, resource_group_name: str, application_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1360,7 +1388,7 @@ async def _start_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_start_request( @@ -1413,7 +1441,7 @@ async def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1455,7 +1483,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _stop_initial( self, resource_group_name: str, application_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,7 +1494,7 @@ async def _stop_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_stop_request( @@ -1519,7 +1547,7 @@ async def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1561,7 +1589,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _backend_health_initial( self, resource_group_name: str, application_gateway_name: str, *, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1572,7 +1600,7 @@ async def _backend_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_backend_health_request( @@ -1631,7 +1659,7 @@ async def begin_backend_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayBackendHealth] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1684,7 +1712,7 @@ async def _backend_health_on_demand_initial( expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1723,7 @@ async def _backend_health_on_demand_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1842,7 +1870,7 @@ async def begin_backend_health_on_demand( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGatewayBackendHealthOnDemand] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1897,7 +1925,7 @@ async def list_available_server_variables(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1908,7 +1936,7 @@ async def list_available_server_variables(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_server_variables_request( @@ -1946,7 +1974,7 @@ async def list_available_request_headers(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1957,7 +1985,7 @@ async def list_available_request_headers(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_request_headers_request( @@ -1995,7 +2023,7 @@ async def list_available_response_headers(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2006,7 +2034,7 @@ async def list_available_response_headers(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_response_headers_request( @@ -2044,7 +2072,7 @@ async def list_available_waf_rule_sets(self, **kwargs: Any) -> _models.Applicati :rtype: ~azure.mgmt.network.models.ApplicationGatewayAvailableWafRuleSetsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2055,7 +2083,7 @@ async def list_available_waf_rule_sets(self, **kwargs: Any) -> _models.Applicati _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableWafRuleSetsResult] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_waf_rule_sets_request( @@ -2094,7 +2122,7 @@ async def list_available_ssl_options(self, **kwargs: Any) -> _models.Application :rtype: ~azure.mgmt.network.models.ApplicationGatewayAvailableSslOptions :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2105,7 +2133,7 @@ async def list_available_ssl_options(self, **kwargs: Any) -> _models.Application _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableSslOptions] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_ssl_options_request( @@ -2149,10 +2177,10 @@ def list_available_ssl_predefined_policies( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableSslPredefinedPolicies] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2213,7 +2241,7 @@ async def get_ssl_predefined_policy( :rtype: ~azure.mgmt.network.models.ApplicationGatewaySslPredefinedPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2224,7 +2252,7 @@ async def get_ssl_predefined_policy( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewaySslPredefinedPolicy] = kwargs.pop("cls", None) _request = build_application_gateways_get_ssl_predefined_policy_request( @@ -2293,10 +2321,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateLinkResourceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2398,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, application_gateway_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2381,7 +2409,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateway_private_endpoint_connections_delete_request( @@ -2438,7 +2466,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2486,7 +2514,7 @@ async def _update_initial( parameters: Union[_models.ApplicationGatewayPrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2497,7 +2525,7 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -2644,7 +2672,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2711,7 +2739,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ApplicationGatewayPrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2722,7 +2750,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnection] = kwargs.pop("cls", None) _request = build_application_gateway_private_endpoint_connections_get_request( @@ -2773,10 +2801,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2857,7 +2885,7 @@ async def get(self, location: str, **kwargs: Any) -> _models.ApplicationGatewayW :rtype: ~azure.mgmt.network.models.ApplicationGatewayWafDynamicManifestResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2868,7 +2896,7 @@ async def get(self, location: str, **kwargs: Any) -> _models.ApplicationGatewayW _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayWafDynamicManifestResult] = kwargs.pop("cls", None) _request = build_application_gateway_waf_dynamic_manifests_default_get_request( @@ -2933,10 +2961,10 @@ def get(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Applicatio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayWafDynamicManifestResultList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3009,7 +3037,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, application_security_group_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3020,7 +3048,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_application_security_groups_delete_request( @@ -3073,7 +3101,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3126,7 +3154,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ApplicationSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3137,7 +3165,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) _request = build_application_security_groups_get_request( @@ -3175,7 +3203,7 @@ async def _create_or_update_initial( parameters: Union[_models.ApplicationSecurityGroup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3186,7 +3214,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -3315,7 +3343,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3435,7 +3463,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ApplicationSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3446,7 +3474,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) @@ -3502,10 +3530,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.ApplicationSecurityG _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3569,10 +3597,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3655,10 +3683,10 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Available _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableDelegationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3745,10 +3773,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableDelegationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3834,10 +3862,10 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Available _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableServiceAliasesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,10 +3934,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableServiceAliasesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3983,7 +4011,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3994,7 +4022,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_azure_firewalls_delete_request( @@ -4047,7 +4075,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4098,7 +4126,7 @@ async def get(self, resource_group_name: str, azure_firewall_name: str, **kwargs :rtype: ~azure.mgmt.network.models.AzureFirewall :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4109,7 +4137,7 @@ async def get(self, resource_group_name: str, azure_firewall_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) _request = build_azure_firewalls_get_request( @@ -4147,7 +4175,7 @@ async def _create_or_update_initial( parameters: Union[_models.AzureFirewall, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4158,7 +4186,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -4287,7 +4315,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4341,7 +4369,7 @@ async def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4352,7 +4380,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -4479,7 +4507,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4539,10 +4567,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4603,10 +4631,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.AzureFirewall"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4658,7 +4686,7 @@ async def get_next(next_link=None): async def _list_learned_prefixes_initial( self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4669,7 +4697,7 @@ async def _list_learned_prefixes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_azure_firewalls_list_learned_prefixes_request( @@ -4723,7 +4751,7 @@ async def begin_list_learned_prefixes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.IPPrefixesList] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4773,7 +4801,7 @@ async def _packet_capture_initial( parameters: Union[_models.FirewallPacketCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4784,7 +4812,7 @@ async def _packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -4911,7 +4939,7 @@ async def begin_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4986,10 +5014,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.AzureFirewallFqdnTag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallFqdnTagListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5071,7 +5099,7 @@ async def get(self, name: str, *, expand: Optional[str] = None, **kwargs: Any) - :rtype: ~azure.mgmt.network.models.AzureWebCategory :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5082,7 +5110,7 @@ async def get(self, name: str, *, expand: Optional[str] = None, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureWebCategory] = kwargs.pop("cls", None) _request = build_web_categories_get_request( @@ -5124,10 +5152,10 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AzureWeb _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureWebCategoryListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5199,7 +5227,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, bastion_host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5238,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_bastion_hosts_delete_request( @@ -5263,7 +5291,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -5314,7 +5342,7 @@ async def get(self, resource_group_name: str, bastion_host_name: str, **kwargs: :rtype: ~azure.mgmt.network.models.BastionHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5325,7 +5353,7 @@ async def get(self, resource_group_name: str, bastion_host_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) _request = build_bastion_hosts_get_request( @@ -5363,7 +5391,7 @@ async def _create_or_update_initial( parameters: Union[_models.BastionHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5374,7 +5402,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -5503,7 +5531,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5557,7 +5585,7 @@ async def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5568,7 +5596,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -5695,7 +5723,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5753,10 +5781,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.BastionHost"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5818,10 +5846,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5909,7 @@ async def _put_bastion_shareable_link_initial( bsl_request: Union[_models.BastionShareableLinkListRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5892,7 +5920,7 @@ async def _put_bastion_shareable_link_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -5950,6 +5978,7 @@ async def begin_put_bastion_shareable_link( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[AsyncIterable["_models.BastionShareableLink"]]: + # pylint: disable=line-too-long """Creates a Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. Required. @@ -5979,6 +6008,7 @@ async def begin_put_bastion_shareable_link( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[AsyncIterable["_models.BastionShareableLink"]]: + # pylint: disable=line-too-long """Creates a Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. Required. @@ -6006,6 +6036,7 @@ async def begin_put_bastion_shareable_link( bsl_request: Union[_models.BastionShareableLinkListRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[AsyncIterable["_models.BastionShareableLink"]]: + # pylint: disable=line-too-long """Creates a Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. Required. @@ -6025,11 +6056,11 @@ async def begin_put_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionShareableLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6140,7 +6171,7 @@ async def _delete_bastion_shareable_link_initial( bsl_request: Union[_models.BastionShareableLinkListRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6151,7 +6182,7 @@ async def _delete_bastion_shareable_link_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -6277,7 +6308,7 @@ async def begin_delete_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6326,7 +6357,7 @@ async def _delete_bastion_shareable_link_by_token_initial( # pylint: disable=na bsl_token_request: Union[_models.BastionShareableLinkTokenListRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6337,7 +6368,7 @@ async def _delete_bastion_shareable_link_by_token_initial( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -6467,7 +6498,7 @@ async def begin_delete_bastion_shareable_link_by_token( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6593,11 +6624,11 @@ def get_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionShareableLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6661,7 +6692,7 @@ async def get_next(next_link=None): async def _get_active_sessions_initial( self, resource_group_name: str, bastion_host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6672,7 +6703,7 @@ async def _get_active_sessions_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_management_get_active_sessions_request( @@ -6712,6 +6743,7 @@ async def _get_active_sessions_initial( async def begin_get_active_sessions( self, resource_group_name: str, bastion_host_name: str, **kwargs: Any ) -> AsyncLROPoller[AsyncIterable["_models.BastionActiveSession"]]: + # pylint: disable=line-too-long """Returns the list of currently active sessions on the Bastion. :param resource_group_name: The name of the resource group. Required. @@ -6728,10 +6760,10 @@ async def begin_get_active_sessions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionActiveSessionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6899,11 +6931,11 @@ def disconnect_active_sessions( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionSessionDeleteResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6979,7 +7011,7 @@ async def check_dns_name_availability( :rtype: ~azure.mgmt.network.models.DnsNameAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6990,7 +7022,7 @@ async def check_dns_name_availability( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DnsNameAvailabilityResult] = kwargs.pop("cls", None) _request = build_network_management_check_dns_name_availability_request( @@ -7031,7 +7063,7 @@ async def express_route_provider_port(self, providerport: str, **kwargs: Any) -> :rtype: ~azure.mgmt.network.models.ExpressRouteProviderPort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7042,7 +7074,7 @@ async def express_route_provider_port(self, providerport: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteProviderPort] = kwargs.pop("cls", None) _request = build_network_management_express_route_provider_port_request( @@ -7158,7 +7190,7 @@ async def list_active_connectivity_configurations( :rtype: ~azure.mgmt.network.models.ActiveConnectivityConfigurationsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7169,7 +7201,7 @@ async def list_active_connectivity_configurations( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActiveConnectivityConfigurationsListResult] = kwargs.pop("cls", None) @@ -7299,7 +7331,7 @@ async def list_active_security_admin_rules( :rtype: ~azure.mgmt.network.models.ActiveSecurityAdminRulesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7310,7 +7342,7 @@ async def list_active_security_admin_rules( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActiveSecurityAdminRulesListResult] = kwargs.pop("cls", None) @@ -7443,7 +7475,7 @@ async def list_network_manager_effective_connectivity_configurations( # pylint: :rtype: ~azure.mgmt.network.models.NetworkManagerEffectiveConnectivityConfigurationListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7454,7 +7486,7 @@ async def list_network_manager_effective_connectivity_configurations( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerEffectiveConnectivityConfigurationListResult] = kwargs.pop("cls", None) @@ -7586,7 +7618,7 @@ async def list_network_manager_effective_security_admin_rules( # pylint: disabl :rtype: ~azure.mgmt.network.models.NetworkManagerEffectiveSecurityAdminRulesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7597,7 +7629,7 @@ async def list_network_manager_effective_security_admin_rules( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerEffectiveSecurityAdminRulesListResult] = kwargs.pop("cls", None) @@ -7658,7 +7690,7 @@ async def supported_security_providers( :rtype: ~azure.mgmt.network.models.VirtualWanSecurityProviders :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7669,7 +7701,7 @@ async def supported_security_providers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualWanSecurityProviders] = kwargs.pop("cls", None) _request = build_network_management_supported_security_providers_request( @@ -7707,7 +7739,7 @@ async def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( # pylint vpn_client_params: Union[_models.VirtualWanVpnProfileParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7718,7 +7750,7 @@ async def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -7853,7 +7885,7 @@ async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnProfileResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -7938,10 +7970,10 @@ def list_cloud_service_role_instance_network_interfaces( # pylint: disable=name _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8010,10 +8042,10 @@ def list_cloud_service_network_interfaces( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8091,7 +8123,7 @@ async def get_cloud_service_network_interface( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8102,7 +8134,7 @@ async def get_cloud_service_network_interface( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) _request = build_network_interfaces_get_cloud_service_network_interface_request( @@ -8139,7 +8171,7 @@ async def get_cloud_service_network_interface( async def _delete_initial( self, resource_group_name: str, network_interface_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8150,7 +8182,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_delete_request( @@ -8203,7 +8235,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -8258,7 +8290,7 @@ async def get( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8269,7 +8301,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) _request = build_network_interfaces_get_request( @@ -8308,7 +8340,7 @@ async def _create_or_update_initial( parameters: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8319,7 +8351,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -8448,7 +8480,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -8568,7 +8600,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8579,7 +8611,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) @@ -8633,10 +8665,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkInterface"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8698,10 +8730,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8754,7 +8786,7 @@ async def get_next(next_link=None): async def _get_effective_route_table_initial( self, resource_group_name: str, network_interface_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8765,7 +8797,7 @@ async def _get_effective_route_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_get_effective_route_table_request( @@ -8819,7 +8851,7 @@ async def begin_get_effective_route_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EffectiveRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -8865,7 +8897,7 @@ def get_long_running_output(pipeline_response): async def _list_effective_network_security_groups_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_interface_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8876,7 +8908,7 @@ async def _list_effective_network_security_groups_initial( # pylint: disable=na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_list_effective_network_security_groups_request( @@ -8931,7 +8963,7 @@ async def begin_list_effective_network_security_groups( # pylint: disable=name- _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EffectiveNetworkSecurityGroupListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -8997,7 +9029,7 @@ def list_virtual_machine_scale_set_vm_network_interfaces( # pylint: disable=nam api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9069,7 +9101,7 @@ def list_virtual_machine_scale_set_network_interfaces( # pylint: disable=name-t api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9147,7 +9179,7 @@ async def get_virtual_machine_scale_set_network_interface( # pylint: disable=na :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9227,7 +9259,7 @@ def list_virtual_machine_scale_set_ip_configurations( # pylint: disable=name-to api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9311,7 +9343,7 @@ async def get_virtual_machine_scale_set_ip_configuration( # pylint: disable=nam :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9394,10 +9426,10 @@ def list_cloud_service_public_ip_addresses( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9478,10 +9510,10 @@ def list_cloud_service_role_instance_public_ip_addresses( # pylint: disable=nam _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9568,7 +9600,7 @@ async def get_cloud_service_public_ip_address( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9579,7 +9611,7 @@ async def get_cloud_service_public_ip_address( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) _request = build_public_ip_addresses_get_cloud_service_public_ip_address_request( @@ -9618,7 +9650,7 @@ async def get_cloud_service_public_ip_address( async def _delete_initial( self, resource_group_name: str, public_ip_address_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9629,7 +9661,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_addresses_delete_request( @@ -9686,7 +9718,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -9741,7 +9773,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9752,7 +9784,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) _request = build_public_ip_addresses_get_request( @@ -9791,7 +9823,7 @@ async def _create_or_update_initial( parameters: Union[_models.PublicIPAddress, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9802,7 +9834,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -9931,7 +9963,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -10051,7 +10083,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10062,7 +10094,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) @@ -10116,10 +10148,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.PublicIPAddress"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10181,10 +10213,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10237,7 +10269,7 @@ async def get_next(next_link=None): async def _ddos_protection_status_initial( self, resource_group_name: str, public_ip_address_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10248,7 +10280,7 @@ async def _ddos_protection_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_addresses_ddos_protection_status_request( @@ -10307,7 +10339,7 @@ async def begin_ddos_protection_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIpDdosProtectionStatusResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -10370,7 +10402,7 @@ def list_virtual_machine_scale_set_public_ip_addresses( # pylint: disable=name- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10454,7 +10486,7 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( # pylint: disable=na api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10541,7 +10573,7 @@ async def get_virtual_machine_scale_set_public_ip_address( # pylint: disable=na :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10621,7 +10653,7 @@ async def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.network.models.SwapResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10633,7 +10665,7 @@ async def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _mode _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SwapResource] = kwargs.pop("cls", None) _request = build_vip_swap_get_request( @@ -10668,7 +10700,7 @@ async def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _mode async def _create_initial( self, group_name: str, resource_name: str, parameters: Union[_models.SwapResource, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10680,7 +10712,7 @@ async def _create_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -10804,7 +10836,7 @@ async def begin_create( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -10858,7 +10890,7 @@ async def list(self, group_name: str, resource_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.network.models.SwapResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10869,7 +10901,7 @@ async def list(self, group_name: str, resource_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SwapResourceListResult] = kwargs.pop("cls", None) _request = build_vip_swap_list_request( @@ -10923,7 +10955,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, custom_ip_prefix_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10934,7 +10966,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_custom_ip_prefixes_delete_request( @@ -10987,7 +11019,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -11042,7 +11074,7 @@ async def get( :rtype: ~azure.mgmt.network.models.CustomIpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11053,7 +11085,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) _request = build_custom_ip_prefixes_get_request( @@ -11092,7 +11124,7 @@ async def _create_or_update_initial( parameters: Union[_models.CustomIpPrefix, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11103,7 +11135,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -11232,7 +11264,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -11351,7 +11383,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.CustomIpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11362,7 +11394,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) @@ -11416,10 +11448,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CustomIpPrefix"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11481,10 +11513,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11557,7 +11589,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, ddos_custom_policy_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11568,7 +11600,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_ddos_custom_policies_delete_request( @@ -11625,7 +11657,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -11678,7 +11710,7 @@ async def get( :rtype: ~azure.mgmt.network.models.DdosCustomPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11689,7 +11721,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) _request = build_ddos_custom_policies_get_request( @@ -11727,7 +11759,7 @@ async def _create_or_update_initial( parameters: Union[_models.DdosCustomPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11738,7 +11770,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -11865,7 +11897,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -11985,7 +12017,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.DdosCustomPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11996,7 +12028,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) @@ -12062,7 +12094,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, ddos_protection_plan_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12073,7 +12105,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_ddos_protection_plans_delete_request( @@ -12130,7 +12162,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -12183,7 +12215,7 @@ async def get( :rtype: ~azure.mgmt.network.models.DdosProtectionPlan :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12194,7 +12226,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) _request = build_ddos_protection_plans_get_request( @@ -12232,7 +12264,7 @@ async def _create_or_update_initial( parameters: Union[_models.DdosProtectionPlan, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12243,7 +12275,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -12370,7 +12402,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -12492,7 +12524,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.DdosProtectionPlan :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12503,7 +12535,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) @@ -12557,10 +12589,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DdosProtectionPlan"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlanListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12624,10 +12656,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlanListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12704,7 +12736,7 @@ async def _create_or_update_initial( parameters: Union[_models.DscpConfiguration, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12715,7 +12747,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -12844,7 +12876,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscpConfiguration] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -12893,7 +12925,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, dscp_configuration_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12904,7 +12936,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_dscp_configuration_delete_request( @@ -12957,7 +12989,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -13010,7 +13042,7 @@ async def get( :rtype: ~azure.mgmt.network.models.DscpConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13021,7 +13053,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfiguration] = kwargs.pop("cls", None) _request = build_dscp_configuration_get_request( @@ -13065,10 +13097,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13129,10 +13161,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.DscpConfiguration"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13216,10 +13248,10 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.EndpointS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EndpointServicesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13292,7 +13324,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, circuit_name: str, authorization_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13303,7 +13335,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_authorizations_delete_request( @@ -13359,7 +13391,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -13415,7 +13447,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitAuthorization :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13426,7 +13458,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitAuthorization] = kwargs.pop("cls", None) _request = build_express_route_circuit_authorizations_get_request( @@ -13466,7 +13498,7 @@ async def _create_or_update_initial( authorization_parameters: Union[_models.ExpressRouteCircuitAuthorization, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13477,7 +13509,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -13621,7 +13653,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitAuthorization] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -13688,10 +13720,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AuthorizationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13765,7 +13797,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13776,7 +13808,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_peerings_delete_request( @@ -13832,7 +13864,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -13888,7 +13920,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13899,7 +13931,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitPeering] = kwargs.pop("cls", None) _request = build_express_route_circuit_peerings_get_request( @@ -13939,7 +13971,7 @@ async def _create_or_update_initial( peering_parameters: Union[_models.ExpressRouteCircuitPeering, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13950,7 +13982,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -14092,7 +14124,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitPeering] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -14159,10 +14191,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14236,7 +14268,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14247,7 +14279,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_connections_delete_request( @@ -14307,7 +14339,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -14366,7 +14398,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14377,7 +14409,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitConnection] = kwargs.pop("cls", None) _request = build_express_route_circuit_connections_get_request( @@ -14419,7 +14451,7 @@ async def _create_or_update_initial( express_route_circuit_connection_parameters: Union[_models.ExpressRouteCircuitConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14430,7 +14462,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -14585,7 +14617,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -14656,10 +14688,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14750,7 +14782,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PeerExpressRouteCircuitConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14761,7 +14793,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PeerExpressRouteCircuitConnection] = kwargs.pop("cls", None) _request = build_peer_express_route_circuit_connections_get_request( @@ -14816,10 +14848,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PeerExpressRouteCircuitConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14892,7 +14924,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial(self, resource_group_name: str, circuit_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14903,7 +14935,7 @@ async def _delete_initial(self, resource_group_name: str, circuit_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_delete_request( @@ -14954,7 +14986,7 @@ async def begin_delete(self, resource_group_name: str, circuit_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -15005,7 +15037,7 @@ async def get(self, resource_group_name: str, circuit_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.ExpressRouteCircuit :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15016,7 +15048,7 @@ async def get(self, resource_group_name: str, circuit_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_request( @@ -15054,7 +15086,7 @@ async def _create_or_update_initial( parameters: Union[_models.ExpressRouteCircuit, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15065,7 +15097,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -15194,7 +15226,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -15314,7 +15346,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuit :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15325,7 +15357,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) @@ -15371,7 +15403,7 @@ async def update_tags( async def _list_arp_table_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15382,7 +15414,7 @@ async def _list_arp_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_arp_table_request( @@ -15444,7 +15476,7 @@ async def begin_list_arp_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsArpTableListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -15492,7 +15524,7 @@ def get_long_running_output(pipeline_response): async def _list_routes_table_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15503,7 +15535,7 @@ async def _list_routes_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_routes_table_request( @@ -15565,7 +15597,7 @@ async def begin_list_routes_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -15615,7 +15647,7 @@ def get_long_running_output(pipeline_response): async def _list_routes_table_summary_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15626,7 +15658,7 @@ async def _list_routes_table_summary_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_routes_table_summary_request( @@ -15688,7 +15720,7 @@ async def begin_list_routes_table_summary( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableSummaryListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -15749,7 +15781,7 @@ async def get_stats( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitStats :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15760,7 +15792,7 @@ async def get_stats( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitStats] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_stats_request( @@ -15807,7 +15839,7 @@ async def get_peering_stats( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitStats :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15818,7 +15850,7 @@ async def get_peering_stats( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitStats] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_peering_stats_request( @@ -15863,10 +15895,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15927,10 +15959,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.ExpressRouteCircuit" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16012,10 +16044,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ExpressRouteServiceProvi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteServiceProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16102,10 +16134,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16172,10 +16204,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16241,7 +16273,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16252,7 +16284,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_get_request( @@ -16290,7 +16322,7 @@ async def _create_or_update_initial( parameters: Union[_models.ExpressRouteCrossConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16301,7 +16333,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -16433,7 +16465,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -16555,7 +16587,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16566,7 +16598,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) @@ -16612,7 +16644,7 @@ async def update_tags( async def _list_arp_table_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16623,7 +16655,7 @@ async def _list_arp_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_arp_table_request( @@ -16685,7 +16717,7 @@ async def begin_list_arp_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsArpTableListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -16733,7 +16765,7 @@ def get_long_running_output(pipeline_response): async def _list_routes_table_summary_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16744,7 +16776,7 @@ async def _list_routes_table_summary_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_routes_table_summary_request( @@ -16786,6 +16818,7 @@ async def _list_routes_table_summary_initial( 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]: + # pylint: disable=line-too-long """Gets the route table summary associated with the express route cross connection in a resource group. @@ -16806,7 +16839,7 @@ async def begin_list_routes_table_summary( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -16858,7 +16891,7 @@ def get_long_running_output(pipeline_response): async def _list_routes_table_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16869,7 +16902,7 @@ async def _list_routes_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_routes_table_request( @@ -16931,7 +16964,7 @@ async def begin_list_routes_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -17017,10 +17050,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionPeeringList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17074,7 +17107,7 @@ async def get_next(next_link=None): async def _delete_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17085,7 +17118,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connection_peerings_delete_request( @@ -17141,7 +17174,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -17197,7 +17230,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnectionPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17208,7 +17241,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionPeering] = kwargs.pop("cls", None) _request = build_express_route_cross_connection_peerings_get_request( @@ -17248,7 +17281,7 @@ async def _create_or_update_initial( peering_parameters: Union[_models.ExpressRouteCrossConnectionPeering, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17259,7 +17292,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -17403,7 +17436,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnectionPeering] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -17486,10 +17519,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ExpressRoutePortsLocatio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortsLocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17549,7 +17582,7 @@ async def get(self, location_name: str, **kwargs: Any) -> _models.ExpressRoutePo :rtype: ~azure.mgmt.network.models.ExpressRoutePortsLocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17560,7 +17593,7 @@ async def get(self, location_name: str, **kwargs: Any) -> _models.ExpressRoutePo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortsLocation] = kwargs.pop("cls", None) _request = build_express_route_ports_locations_get_request( @@ -17613,7 +17646,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, express_route_port_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17624,7 +17657,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_ports_delete_request( @@ -17684,7 +17717,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -17738,7 +17771,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRoutePort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17749,7 +17782,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) _request = build_express_route_ports_get_request( @@ -17787,7 +17820,7 @@ async def _create_or_update_initial( parameters: Union[_models.ExpressRoutePort, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17798,7 +17831,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -17925,7 +17958,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -18045,7 +18078,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRoutePort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18056,7 +18089,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) @@ -18114,10 +18147,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18178,10 +18211,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ExpressRoutePort"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18303,7 +18336,7 @@ async def generate_loa( :rtype: ~azure.mgmt.network.models.GenerateExpressRoutePortsLOAResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18314,7 +18347,7 @@ async def generate_loa( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GenerateExpressRoutePortsLOAResult] = kwargs.pop("cls", None) @@ -18393,7 +18426,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18404,7 +18437,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteLink] = kwargs.pop("cls", None) _request = build_express_route_links_get_request( @@ -18453,10 +18486,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18530,7 +18563,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, express_route_port_name: str, authorization_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18541,7 +18574,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_port_authorizations_delete_request( @@ -18604,7 +18637,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -18661,7 +18694,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRoutePortAuthorization :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18672,7 +18705,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortAuthorization] = kwargs.pop("cls", None) _request = build_express_route_port_authorizations_get_request( @@ -18712,7 +18745,7 @@ async def _create_or_update_initial( authorization_parameters: Union[_models.ExpressRoutePortAuthorization, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18723,7 +18756,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -18867,7 +18900,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePortAuthorization] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -18934,10 +18967,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortAuthorizationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19019,7 +19052,7 @@ async def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> _models. :rtype: ~azure.mgmt.network.models.ExpressRouteProviderPortListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19030,7 +19063,7 @@ async def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> _models. _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteProviderPortListResult] = kwargs.pop("cls", None) _request = build_express_route_provider_ports_location_list_request( @@ -19083,7 +19116,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19094,7 +19127,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policies_delete_request( @@ -19147,7 +19180,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -19202,7 +19235,7 @@ async def get( :rtype: ~azure.mgmt.network.models.FirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19213,7 +19246,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) _request = build_firewall_policies_get_request( @@ -19252,7 +19285,7 @@ async def _create_or_update_initial( parameters: Union[_models.FirewallPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19263,7 +19296,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -19392,7 +19425,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -19512,7 +19545,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.FirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19523,7 +19556,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) @@ -19579,10 +19612,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19643,10 +19676,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.FirewallPolicy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19718,7 +19751,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, firewall_policy_name: str, rule_collection_group_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19729,7 +19762,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_groups_delete_request( @@ -19785,7 +19818,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -19841,7 +19874,7 @@ async def get( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19852,7 +19885,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroup] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_groups_get_request( @@ -19892,7 +19925,7 @@ async def _create_or_update_initial( parameters: Union[_models.FirewallPolicyRuleCollectionGroup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19903,7 +19936,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -20046,7 +20079,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyRuleCollectionGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -20113,10 +20146,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20262,7 +20295,7 @@ async def list( :rtype: ~azure.mgmt.network.models.QueryResults :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20273,7 +20306,7 @@ async def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.QueryResults] = kwargs.pop("cls", None) @@ -20409,7 +20442,7 @@ async def patch( :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20420,7 +20453,7 @@ async def patch( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) @@ -20536,7 +20569,7 @@ async def put( :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20547,7 +20580,7 @@ async def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) @@ -20604,7 +20637,7 @@ async def get( :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20615,7 +20648,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) _request = build_firewall_policy_idps_signatures_overrides_get_request( @@ -20661,7 +20694,7 @@ async def list( :rtype: ~azure.mgmt.network.models.SignaturesOverridesList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20672,7 +20705,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SignaturesOverridesList] = kwargs.pop("cls", None) _request = build_firewall_policy_idps_signatures_overrides_list_request( @@ -20796,7 +20829,7 @@ async def list( :rtype: ~azure.mgmt.network.models.SignatureOverridesFilterValuesResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20807,7 +20840,7 @@ async def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignatureOverridesFilterValuesResponse] = kwargs.pop("cls", None) @@ -20945,7 +20978,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.FirewallPolicyDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20956,7 +20989,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyDraft] = kwargs.pop("cls", None) @@ -21000,9 +21033,7 @@ async def create_or_update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any) -> None: """Delete a draft policy. :param resource_group_name: The name of the resource group. Required. @@ -21013,7 +21044,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21024,7 +21055,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_firewall_policy_drafts_delete_request( @@ -21065,7 +21096,7 @@ async def get( :rtype: ~azure.mgmt.network.models.FirewallPolicyDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21076,7 +21107,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyDraft] = kwargs.pop("cls", None) _request = build_firewall_policy_drafts_get_request( @@ -21130,7 +21161,7 @@ def __init__(self, *args, **kwargs) -> None: async def _deploy_initial( self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21141,7 +21172,7 @@ async def _deploy_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policy_deployments_deploy_request( @@ -21200,7 +21231,7 @@ async def begin_deploy( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -21261,7 +21292,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, resource_group_name: str, firewall_policy_name: str, rule_collection_group_name: str, **kwargs: Any ) -> None: """Delete Rule Collection Group Draft. @@ -21276,7 +21307,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21287,7 +21318,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_group_drafts_delete_request( @@ -21401,7 +21432,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroupDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21412,7 +21443,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupDraft] = kwargs.pop("cls", None) @@ -21472,7 +21503,7 @@ async def get( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroupDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21483,7 +21514,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupDraft] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_group_drafts_get_request( @@ -21516,14 +21547,14 @@ async def get( return deserialized # type: ignore -class IpAllocationsOperations: +class IpamPoolsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`ip_allocations` attribute. + :attr:`ipam_pools` attribute. """ models = _models @@ -21535,133 +21566,48 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _delete_initial( - self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_ip_allocations_delete_request( - resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IpamPool"]: + """Gets list of Pool resources at Network Manager level. - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified IpAllocation. + Gets list of Pool resources at Network Manager level. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either IpamPool or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpamPoolList] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21669,49 +21615,64 @@ async def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + _request = build_ipam_pools_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - _request = build_ip_allocations_get_request( - resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + async def extract_data(pipeline_response): + deserialized = self._deserialize("IpamPoolList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - response = pipeline_response.http_response + async def get_next(next_link=None): + _request = prepare_request(next_link) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - deserialized = self._deserialize("IpAllocation", 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return AsyncItemPaged(get_next, extract_data) - async def _create_or_update_initial( + async def _create_initial( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.IpAllocation, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Union[_models.IpamPool, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21722,21 +21683,22 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(parameters, "IpAllocation") + _json = self._serialize.body(body, "IpamPool") - _request = build_ip_allocations_create_or_update_request( + _request = build_ipam_pools_create_request( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -21761,107 +21723,128 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: _models.IpAllocation, + network_manager_name: str, + pool_name: str, + body: _models.IpamPool, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> AsyncLROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - Required. - :type parameters: ~azure.mgmt.network.models.IpAllocation + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Required. + :type body: ~azure.mgmt.network.models.IpamPool :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of + :return: An instance of AsyncLROPoller that returns either IpamPool or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: IO[bytes], + network_manager_name: str, + pool_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> AsyncLROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Required. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of + :return: An instance of AsyncLROPoller that returns either IpamPool or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.IpAllocation, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Union[_models.IpamPool, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> AsyncLROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. Is - either a IpAllocation type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.IpAllocation or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Is either a IpamPool type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.network.models.IpamPool or IO[bytes] + :return: An instance of AsyncLROPoller that returns either IpamPool or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - parameters=parameters, + network_manager_name=network_manager_name, + pool_name=pool_name, + body=body, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, @@ -21873,7 +21856,7 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -21888,90 +21871,105 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.IpAllocation].from_continuation_token( + return AsyncLROPoller[_models.IpamPool].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.IpAllocation]( + return AsyncLROPoller[_models.IpamPool]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload - async def update_tags( + async def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: _models.TagsObject, + network_manager_name: str, + pool_name: str, + body: Optional[_models.IpamPoolUpdate] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Default value is None. + :type body: ~azure.mgmt.network.models.IpamPoolUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: IO[bytes], + network_manager_name: str, + pool_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Default value is None. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def update_tags( + async def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Optional[Union[_models.IpamPoolUpdate, IO[bytes]]] = None, **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Is either a TagsObject type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Is either a IpamPoolUpdate type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.IpamPoolUpdate or IO[bytes] + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21982,21 +21980,25 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(parameters, "TagsObject") + if body is not None: + _json = self._serialize.body(body, "IpamPoolUpdate") + else: + _json = None - _request = build_ip_allocations_update_tags_request( + _request = build_ipam_pools_update_request( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -22016,182 +22018,35 @@ async def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.IpAllocation"]: - """Gets all IpAllocations in a subscription. - - :return: An iterator like instance of either IpAllocation or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpAllocation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpAllocation"]: - """Gets all IpAllocations in a resource group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :return: An iterator like instance of either IpAllocation or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpAllocation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class IpGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`ip_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @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. + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> _models.IpamPool: + """Gets the specific Pool resource. + + Gets the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :keyword expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back - referenced by the IpGroups resource. Default value is None. - :paramtype expand: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22202,14 +22057,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) - _request = build_ip_groups_get_request( + _request = build_ipam_pools_get_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, - expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -22225,24 +22080,20 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpGroup", pipeline_response.http_response) + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _create_or_update_initial( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.IpGroup, IO[bytes]], - **kwargs: Any + async def _delete_initial( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22250,29 +22101,18 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IpGroup") - - _request = build_ip_groups_create_or_update_request( + _request = build_ipam_pools_delete_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -22286,114 +22126,58 @@ async def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [202, 204]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: _models.IpGroup, - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Required. - :type parameters: ~azure.mgmt.network.models.IpGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.IpGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpGroup]: - """Creates or updates an ipGroups in a specified resource group. + async def begin_delete( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the Pool resource. + + Delete the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Is either a - IpGroup type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.IpGroup or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :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: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, - parameters=parameters, + network_manager_name=network_manager_name, + pool_name=pool_name, api_version=api_version, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -22402,106 +22186,46 @@ async def begin_create_or_update( await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpGroup", pipeline_response.http_response) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.IpGroup].from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.IpGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. + async def get_pool_usage( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> _models.PoolUsage: + """Get the Pool Usage. + + Get the Pool Usage. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Is either a TagsObject - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: PoolUsage or the result of cls(response) + :rtype: ~azure.mgmt.network.models.PoolUsage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22509,29 +22233,18 @@ async def update_groups( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagsObject") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.PoolUsage] = kwargs.pop("cls", None) - _request = build_ip_groups_update_groups_request( + _request = build_ipam_pools_get_pool_usage_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -22546,138 +22259,41 @@ async def update_groups( 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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, ip_groups_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_ip_groups_delete_request( - resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("PoolUsage", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace_async - async def begin_delete(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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :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: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpGroup"]: - """Gets all IpGroups in a resource group. + def list_associated_resources( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> AsyncIterable["_models.PoolAssociation"]: + """List Associated Resource in the Pool. + + List Associated Resource in the Pool. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either IpGroup or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpGroup] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: An iterator like instance of either PoolAssociation or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.PoolAssociation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.PoolAssociationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22688,8 +22304,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - _request = build_ip_groups_list_by_resource_group_request( + _request = build_ipam_pools_list_associated_resources_request( resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -22704,7 +22322,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("IpGroupListResult", pipeline_response) + deserialized = self._deserialize("PoolAssociationList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -22721,28 +22339,78 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + +class StaticCidrsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`static_cidrs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.IpGroup"]: - """Gets all IpGroups in a subscription. + def list( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.StaticCidr"]: + """Gets list of Static CIDR resources at Network Manager level. - :return: An iterator like instance of either IpGroup or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpGroup] + Gets list of Static CIDR resources at Network Manager level. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either StaticCidr or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.StaticCidr] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticCidrList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22753,8 +22421,16 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.IpGroup"]: def prepare_request(next_link=None): if not next_link: - _request = build_ip_groups_list_request( + _request = build_static_cidrs_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, api_version=api_version, headers=_headers, params=_params, @@ -22768,7 +22444,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("IpGroupListResult", pipeline_response) + deserialized = self._deserialize("StaticCidrList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -22785,37 +22461,111 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + @overload + async def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[_models.StaticCidr] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. -class LoadBalancersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + Creates/Updates the Static CIDR resource. - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancers` attribute. - """ + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Default value is None. + :type body: ~azure.mgmt.network.models.StaticCidr + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ - models = _models + @overload + async def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + Creates/Updates the Static CIDR resource. - async def _delete_initial( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[Union[_models.StaticCidr, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. + + Creates/Updates the Static CIDR resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Is either a StaticCidr type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.StaticCidr or IO[bytes] + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22823,39 +22573,52 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StaticCidr] = kwargs.pop("cls", None) - _request = build_load_balancers_delete_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "StaticCidr") + else: + _json = None + + _request = build_static_cidrs_create_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("StaticCidr", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -22863,52 +22626,312 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer. + async def get( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> _models.StaticCidr: + """Gets the specific Static CIDR resource. + + Gets the specific Static CIDR resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: StaticCidr resource name to retrieve. Required. + :type static_cidr_name: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticCidr] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + _request = build_static_cidrs_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("StaticCidr", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_static_cidrs_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the Static CIDR resource. + + Delete the Static CIDR resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: StaticCidr resource name to delete. Required. + :type static_cidr_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class IpAllocationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`ip_allocations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _delete_initial( + self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_allocations_delete_request( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + 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. Required. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, @@ -22920,21 +22943,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str :keyword expand: Expands referenced resources. Default value is None. :paramtype expand: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22945,12 +22968,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) - _request = build_load_balancers_get_request( + _request = build_ip_allocations_get_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, expand=expand, api_version=api_version, @@ -22970,7 +22993,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -22980,11 +23003,11 @@ async def get( async def _create_or_update_initial( self, resource_group_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], + ip_allocation_name: str, + parameters: Union[_models.IpAllocation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22995,7 +23018,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -23005,11 +23028,11 @@ async def _create_or_update_initial( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "LoadBalancer") + _json = self._serialize.body(parameters, "IpAllocation") - _request = build_load_balancers_create_or_update_request( + _request = build_ip_allocations_create_or_update_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -23047,27 +23070,27 @@ async def _create_or_update_initial( async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: _models.LoadBalancer, + ip_allocation_name: str, + parameters: _models.IpAllocation, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancer + :type parameters: ~azure.mgmt.network.models.IpAllocation :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of + :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -23075,27 +23098,27 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of + :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -23103,37 +23126,37 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], + ip_allocation_name: str, + parameters: Union[_models.IpAllocation, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. Is - either a LoadBalancer type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancer or IO[bytes] - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Is + either a IpAllocation type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.IpAllocation or IO[bytes] + :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + ip_allocation_name=ip_allocation_name, parameters=parameters, api_version=api_version, content_type=content_type, @@ -23146,7 +23169,7 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -23161,13 +23184,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.LoadBalancer].from_continuation_token( + return AsyncLROPoller[_models.IpAllocation].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.LoadBalancer]( + return AsyncLROPoller[_models.IpAllocation]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -23175,25 +23198,25 @@ def get_long_running_output(pipeline_response): async def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Required. :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ @@ -23201,25 +23224,25 @@ async def update_tags( async def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ @@ -23227,24 +23250,24 @@ async def update_tags( async def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Is either a TagsObject - type or a IO[bytes] type. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Is either a TagsObject type + or a IO[bytes] type. Required. :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23255,9 +23278,9 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -23267,9 +23290,9 @@ async def update_tags( else: _json = self._serialize.body(parameters, "TagsObject") - _request = build_load_balancers_update_tags_request( + _request = build_ip_allocations_update_tags_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -23291,7 +23314,7 @@ async def update_tags( 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.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -23299,20 +23322,20 @@ async def update_tags( return deserialized # type: ignore @distributed_trace - def list_all(self, **kwargs: Any) -> AsyncIterable["_models.LoadBalancer"]: - """Gets all the load balancers in a subscription. + def list(self, **kwargs: Any) -> AsyncIterable["_models.IpAllocation"]: + """Gets all IpAllocations in a subscription. - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] + :return: An iterator like instance of either IpAllocation or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23323,7 +23346,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.LoadBalancer"]: def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_all_request( + _request = build_ip_allocations_list_request( subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -23338,7 +23361,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -23362,22 +23385,22 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.LoadBalancer"]: - """Gets all the load balancers in a resource group. + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpAllocation"]: + """Gets all IpAllocations in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] + :return: An iterator like instance of either IpAllocation or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23388,7 +23411,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_request( + _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, @@ -23404,7 +23427,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -23427,10 +23450,44 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - async def _swap_public_ip_addresses_initial( - self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + +class IpGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`ip_groups` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @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. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :keyword expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back + referenced by the IpGroups resource. Default value is None. + :paramtype expand: str + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23438,165 +23495,50 @@ async def _swap_public_ip_addresses_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoadBalancerVipSwapRequest") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) - _request = build_load_balancers_swap_public_ip_addresses_request( - location=location, + _request = build_ip_groups_get_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, subscription_id=self._config.subscription_id, + expand=expand, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def begin_swap_public_ip_addresses( + async def _create_or_update_initial( self, - location: str, - parameters: _models.LoadBalancerVipSwapRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @overload - async def begin_swap_public_ip_addresses( - self, location: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @distributed_trace_async - async def begin_swap_public_ip_addresses( - self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Is either a - LoadBalancerVipSwapRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest or IO[bytes] - :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: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-long - self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.IpGroup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23607,7 +23549,7 @@ async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -23617,12 +23559,11 @@ async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name- if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "QueryInboundNatRulePortMappingRequest") + _json = self._serialize.body(parameters, "IpGroup") - _request = build_load_balancers_list_inbound_nat_rule_port_mappings_request( - group_name=group_name, - load_balancer_name=load_balancer_name, - backend_pool_name=backend_pool_name, + _request = build_ip_groups_create_or_update_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, @@ -23641,13 +23582,14 @@ async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name- response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -23657,107 +23599,94 @@ async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name- return deserialized # type: ignore @overload - async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + async def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: _models.QueryInboundNatRulePortMappingRequest, + resource_group_name: str, + ip_groups_name: str, + parameters: _models.IpGroup, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> AsyncLROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Required. - :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Required. + :type parameters: ~azure.mgmt.network.models.IpGroup :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BackendAddressInboundNatRulePortMappings or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :return: An instance of AsyncLROPoller that returns either IpGroup or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + async def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, + resource_group_name: str, + ip_groups_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> AsyncLROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Required. + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BackendAddressInboundNatRulePortMappings or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :return: An instance of AsyncLROPoller that returns either IpGroup or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + async def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.IpGroup, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> AsyncLROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Is either a - QueryInboundNatRulePortMappingRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BackendAddressInboundNatRulePortMappings or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Is either a + IpGroup type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.IpGroup or IO[bytes] + :return: An instance of AsyncLROPoller that returns either IpGroup or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendAddressInboundNatRulePortMappings] = kwargs.pop("cls", None) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, @@ -23770,106 +23699,105 @@ async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BackendAddressInboundNatRulePortMappings", pipeline_response.http_response - ) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings].from_continuation_token( + return AsyncLROPoller[_models.IpGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]( + return AsyncLROPoller[_models.IpGroup]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload - async def migrate_to_ip_based( + async def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[_models.MigrateLoadBalancerToIpBasedRequest] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. - :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def migrate_to_ip_based( + async def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[IO[bytes]] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def migrate_to_ip_based( + async def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[Union[_models.MigrateLoadBalancerToIpBasedRequest, IO[bytes]]] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Is either a - MigrateLoadBalancerToIpBasedRequest type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest or IO[bytes] - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23880,9 +23808,9 @@ async def migrate_to_ip_based( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigratedPools] = kwargs.pop("cls", None) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -23890,14 +23818,11 @@ async def migrate_to_ip_based( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - if parameters is not None: - _json = self._serialize.body(parameters, "MigrateLoadBalancerToIpBasedRequest") - else: - _json = None + _json = self._serialize.body(parameters, "TagsObject") - _request = build_load_balancers_migrate_to_ip_based_request( - group_name=group_name, - load_balancer_name=load_balancer_name, + _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, @@ -23917,56 +23842,138 @@ async def migrate_to_ip_based( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("MigratedPools", pipeline_response.http_response) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + async def _delete_initial( + self, resource_group_name: str, ip_groups_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) -class LoadBalancerBackendAddressPoolsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_backend_address_pools` attribute. - """ + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - models = _models + _request = build_ip_groups_delete_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + 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 = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(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. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.BackendAddressPool"]: - """Gets all the load balancer backed address pools. + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpGroup"]: + """Gets all IpGroups in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either BackendAddressPool or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.BackendAddressPool] + :return: An iterator like instance of either IpGroup or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerBackendAddressPoolListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23977,9 +23984,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_backend_address_pools_list_request( + _request = build_ip_groups_list_by_resource_group_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -23994,7 +24000,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) + deserialized = self._deserialize("IpGroupListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -24011,29 +24017,28 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + 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) - @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. + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.IpGroup"]: + """Gets all IpGroups in a subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :return: BackendAddressPool or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BackendAddressPool + :return: An iterator like instance of either IpGroup or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24041,22 +24046,214 @@ async def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + _request = build_ip_groups_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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) + + +class LoadBalancersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`load_balancers` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _delete_initial( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_load_balancers_delete_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + 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. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + + _request = build_load_balancers_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + expand=expand, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access @@ -24069,7 +24266,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -24080,11 +24277,10 @@ async def _create_or_update_initial( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: Union[_models.BackendAddressPool, IO[bytes]], + parameters: Union[_models.LoadBalancer, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24095,7 +24291,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -24105,12 +24301,11 @@ async def _create_or_update_initial( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "BackendAddressPool") + _json = self._serialize.body(parameters, "LoadBalancer") - _request = build_load_balancer_backend_address_pools_create_or_update_request( + _request = build_load_balancers_create_or_update_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, content_type=content_type, @@ -24149,29 +24344,26 @@ async def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: _models.BackendAddressPool, + parameters: _models.LoadBalancer, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> AsyncLROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Required. - :type parameters: ~azure.mgmt.network.models.BackendAddressPool + :param parameters: Parameters supplied to the create or update load balancer operation. + Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancer :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -24180,29 +24372,26 @@ async def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> AsyncLROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Required. + :param parameters: Parameters supplied to the create or update load balancer operation. + Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -24211,32 +24400,29 @@ async def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: Union[_models.BackendAddressPool, IO[bytes]], + parameters: Union[_models.LoadBalancer, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> AsyncLROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Is either a BackendAddressPool type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.BackendAddressPool or IO[bytes] - :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + :param parameters: Parameters supplied to the create or update load balancer operation. Is + either a LoadBalancer type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancer or IO[bytes] + :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -24244,7 +24430,6 @@ async def begin_create_or_update( 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, @@ -24257,7 +24442,7 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -24272,20 +24457,90 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.BackendAddressPool].from_continuation_token( + return AsyncLROPoller[_models.LoadBalancer].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.BackendAddressPool]( + return AsyncLROPoller[_models.LoadBalancer]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( - self, resource_group_name: str, load_balancer_name: str, backend_address_pool_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @overload + async def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24293,148 +24548,132 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - _request = build_load_balancer_backend_address_pools_delete_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, - backend_address_pool_name=backend_address_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace_async - async def begin_delete( - 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. + @distributed_trace + def list_all(self, **kwargs: Any) -> AsyncIterable["_models.LoadBalancer"]: + """Gets all the load balancers in a subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) -class LoadBalancerFrontendIPConfigurationsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_frontend_ip_configurations` attribute. - """ + 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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - models = _models + async def get_next(next_link=None): + _request = prepare_request(next_link) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.FrontendIPConfiguration"]: - """Gets all the load balancer frontend IP configurations. + def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.LoadBalancer"]: + """Gets all the load balancers in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either FrontendIPConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.FrontendIPConfiguration] + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerFrontendIPConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24445,9 +24684,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_frontend_ip_configurations_list_request( + _request = build_load_balancers_list_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -24462,7 +24700,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerFrontendIPConfigurationListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -24485,160 +24723,10 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. Required. - :type frontend_ip_configuration_name: str - :return: FrontendIPConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.FrontendIPConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.FrontendIPConfiguration] = kwargs.pop("cls", None) - - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class InboundNatRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`inbound_nat_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InboundNatRule"]: - """Gets all the inbound NAT rules in a load balancer. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.InboundNatRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.InboundNatRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - async def _delete_initial( - self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any + async def _swap_public_ip_addresses_initial( + self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24646,18 +24734,28 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_inbound_nat_rules_delete_request( - resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "LoadBalancerVipSwapRequest") + + _request = build_load_balancers_swap_public_ip_addresses_request( + location=location, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -24671,7 +24769,7 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -24686,36 +24784,77 @@ async def _delete_initial( return deserialized # type: ignore + @overload + async def begin_swap_public_ip_addresses( + self, + location: str, + parameters: _models.LoadBalancerVipSwapRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @overload + async def begin_swap_public_ip_addresses( + self, location: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any + async def begin_swap_public_ip_addresses( + self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer inbound NAT rule. + """Swaps VIPs between two load balancers. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Is either a + LoadBalancerVipSwapRequest type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest or IO[bytes] :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: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, headers=_headers, params=_params, @@ -24745,83 +24884,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: InboundNatRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.InboundNatRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) - - _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, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( + async def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], + backend_pool_name: str, + parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24832,22 +24903,22 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(inbound_nat_rule_parameters, (IOBase, bytes)): - _content = inbound_nat_rule_parameters + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(inbound_nat_rule_parameters, "InboundNatRule") + _json = self._serialize.body(parameters, "QueryInboundNatRulePortMappingRequest") - _request = build_inbound_nat_rules_create_or_update_request( - resource_group_name=resource_group_name, + _request = build_load_balancers_list_inbound_nat_rule_port_mappings_request( + group_name=group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + backend_pool_name=backend_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -24866,7 +24937,7 @@ async def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -24882,107 +24953,108 @@ async def _create_or_update_initial( return deserialized # type: ignore @overload - async def begin_create_or_update( + async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: _models.InboundNatRule, + backend_pool_name: str, + parameters: _models.QueryInboundNatRulePortMappingRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Required. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Required. + :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] + :return: An instance of AsyncLROPoller that returns either + BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: IO[bytes], + backend_pool_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Required. - :type inbound_nat_rule_parameters: IO[bytes] + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] + :return: An instance of AsyncLROPoller that returns either + BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_or_update( + async def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], + backend_pool_name: str, + parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Is either a InboundNatRule type or a IO[bytes] type. Required. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Is either a + QueryInboundNatRulePortMappingRequest type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) + cls: ClsType[_models.BackendAddressInboundNatRulePortMappings] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, + raw_result = await self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + backend_pool_name=backend_pool_name, + parameters=parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, @@ -24994,72 +25066,203 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) + deserialized = self._deserialize( + "BackendAddressInboundNatRulePortMappings", pipeline_response.http_response + ) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.InboundNatRule].from_continuation_token( + return AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.InboundNatRule]( + return AsyncLROPoller[_models.BackendAddressInboundNatRulePortMappings]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @overload + async def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[_models.MigrateLoadBalancerToIpBasedRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. -class LoadBalancerLoadBalancingRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_load_balancing_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param group_name: The name of the resource group. Required. + :type group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools + :raises ~azure.core.exceptions.HttpResponseError: + """ - @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancingRule"]: - """Gets all the load balancing rules in a load balancer. + @overload + async def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either LoadBalancingRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancingRule] + :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerLoadBalancingRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @distributed_trace_async + async def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[Union[_models.MigrateLoadBalancerToIpBasedRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. + + :param group_name: The name of the resource group. Required. + :type group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to the migrateToIpBased Api. Is either a + MigrateLoadBalancerToIpBasedRequest type or a IO[bytes] type. Default value is None. + :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest or IO[bytes] + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigratedPools] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _json = self._serialize.body(parameters, "MigrateLoadBalancerToIpBasedRequest") + else: + _json = None + + _request = build_load_balancers_migrate_to_ip_based_request( + group_name=group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MigratedPools", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class LoadBalancerBackendAddressPoolsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`load_balancer_backend_address_pools` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterable["_models.BackendAddressPool"]: + """Gets all the load balancer backed address pools. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either BackendAddressPool or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerBackendAddressPoolListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25070,7 +25273,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_load_balancing_rules_list_request( + _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, @@ -25087,7 +25290,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerLoadBalancingRuleListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -25112,21 +25315,21 @@ async def get_next(next_link=None): @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. + 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. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. Required. - :type load_balancing_rule_name: str - :return: LoadBalancingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancingRule + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :return: BackendAddressPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BackendAddressPool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25137,13 +25340,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancingRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) - _request = build_load_balancer_load_balancing_rules_get_request( + _request = build_load_balancer_backend_address_pools_get_request( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - load_balancing_rule_name=load_balancing_rule_name, + backend_address_pool_name=backend_address_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -25162,22 +25365,338 @@ async def get( 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.http_response) + deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + async def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: Union[_models.BackendAddressPool, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) -class LoadBalancerOutboundRulesOperations: + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "BackendAddressPool") + + _request = build_load_balancer_backend_address_pools_create_or_update_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, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: _models.BackendAddressPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Required. + :type parameters: ~azure.mgmt.network.models.BackendAddressPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: Union[_models.BackendAddressPool, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Is either a BackendAddressPool type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.BackendAddressPool or IO[bytes] + :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BackendAddressPool].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BackendAddressPool]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, load_balancer_name: str, backend_address_pool_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_load_balancer_backend_address_pools_delete_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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + 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. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class LoadBalancerFrontendIPConfigurationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_outbound_rules` attribute. + :attr:`load_balancer_frontend_ip_configurations` attribute. """ models = _models @@ -25192,24 +25711,26 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list( self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.OutboundRule"]: - """Gets all the outbound rules in a load balancer. + ) -> AsyncIterable["_models.FrontendIPConfiguration"]: + """Gets all the load balancer frontend IP configurations. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either OutboundRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.OutboundRule] + :return: An iterator like instance of either FrontendIPConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.FrontendIPConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerOutboundRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerFrontendIPConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25220,7 +25741,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_outbound_rules_list_request( + _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, @@ -25237,7 +25758,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerOutboundRuleListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerFrontendIPConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -25262,21 +25783,21 @@ async def get_next(next_link=None): @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. + 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. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param outbound_rule_name: The name of the outbound rule. Required. - :type outbound_rule_name: str - :return: OutboundRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.OutboundRule + :param frontend_ip_configuration_name: The name of the frontend IP configuration. Required. + :type frontend_ip_configuration_name: str + :return: FrontendIPConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.FrontendIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25287,13 +25808,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.OutboundRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.FrontendIPConfiguration] = kwargs.pop("cls", None) - _request = build_load_balancer_outbound_rules_get_request( + _request = build_load_balancer_frontend_ip_configurations_get_request( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - outbound_rule_name=outbound_rule_name, + frontend_ip_configuration_name=frontend_ip_configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -25312,7 +25833,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("FrontendIPConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -25320,14 +25841,14 @@ async def get( return deserialized # type: ignore -class LoadBalancerNetworkInterfacesOperations: +class InboundNatRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_network_interfaces` attribute. + :attr:`inbound_nat_rules` attribute. """ models = _models @@ -25342,24 +25863,24 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list( self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterface"]: - """Gets associated load balancer network interfaces. + ) -> AsyncIterable["_models.InboundNatRule"]: + """Gets all the inbound NAT rules in a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterface] + :return: An iterator like instance of either InboundNatRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.InboundNatRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25370,7 +25891,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_network_interfaces_list_request( + _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, @@ -25387,7 +25908,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + deserialized = self._deserialize("InboundNatRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -25410,178 +25931,10 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - -class LoadBalancerProbesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`load_balancer_probes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> AsyncIterable["_models.Probe"]: - """Gets all the load balancer probes. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either Probe or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.Probe] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerProbeListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - @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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param probe_name: The name of the probe. Required. - :type probe_name: str - :return: Probe or the result of cls(response) - :rtype: ~azure.mgmt.network.models.Probe - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.Probe] = kwargs.pop("cls", None) - - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class NatGatewaysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`nat_gateways` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _delete_initial( - self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any + self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25592,12 +25945,13 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_nat_gateways_delete_request( + _request = build_inbound_nat_rules_delete_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, headers=_headers, @@ -25630,14 +25984,16 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any + self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified nat gateway. + """Deletes the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str :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: @@ -25645,7 +26001,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -25653,7 +26009,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, headers=_headers, @@ -25686,21 +26043,29 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str :keyword expand: Expands referenced resources. Default value is None. :paramtype expand: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway + :return: InboundNatRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.InboundNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25711,12 +26076,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) - _request = build_nat_gateways_get_request( + _request = build_inbound_nat_rules_get_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, subscription_id=self._config.subscription_id, expand=expand, api_version=api_version, @@ -25736,7 +26102,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -25746,11 +26112,12 @@ async def get( async def _create_or_update_initial( self, resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.NatGateway, IO[bytes]], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25761,21 +26128,22 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(inbound_nat_rule_parameters, (IOBase, bytes)): + _content = inbound_nat_rule_parameters else: - _json = self._serialize.body(parameters, "NatGateway") + _json = self._serialize.body(inbound_nat_rule_parameters, "InboundNatRule") - _request = build_nat_gateways_create_or_update_request( + _request = build_inbound_nat_rules_create_or_update_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, @@ -25794,7 +26162,7 @@ async def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -25813,26 +26181,30 @@ async def _create_or_update_initial( async def begin_create_or_update( self, resource_group_name: str, - nat_gateway_name: str, - parameters: _models.NatGateway, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: _models.InboundNatRule, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. + ) -> AsyncLROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Required. - :type parameters: ~azure.mgmt.network.models.NatGateway + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Required. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -25840,26 +26212,30 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - nat_gateway_name: str, - parameters: IO[bytes], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. + ) -> AsyncLROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Required. - :type parameters: IO[bytes] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Required. + :type inbound_nat_rule_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -25867,38 +26243,42 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.NatGateway, IO[bytes]], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. + ) -> AsyncLROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Is either - a NatGateway type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NatGateway or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Is either a InboundNatRule type or a IO[bytes] type. Required. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule or IO[bytes] + :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) + cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, @@ -25910,7 +26290,7 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NatGateway", pipeline_response.http_response) + deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -25925,158 +26305,57 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.NatGateway].from_continuation_token( + return AsyncLROPoller[_models.InboundNatRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.NatGateway]( + return AsyncLROPoller[_models.InboundNatRule]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @overload - async def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Is either a TagsObject type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _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, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) +class LoadBalancerLoadBalancingRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - deserialized = self._deserialize("NatGateway", pipeline_response.http_response) + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`load_balancer_load_balancing_rules` attribute. + """ - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + models = _models - return deserialized # type: ignore + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NatGateway"]: - """Gets all the Nat Gateways in a subscription. + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancingRule"]: + """Gets all the load balancing rules in a load balancer. - :return: An iterator like instance of either NatGateway or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NatGateway] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either LoadBalancingRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancingRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerLoadBalancingRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26087,7 +26366,9 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NatGateway"]: def prepare_request(next_link=None): if not next_link: - _request = build_nat_gateways_list_all_request( + _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, headers=_headers, @@ -26102,7 +26383,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerLoadBalancingRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -26125,23 +26406,23 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NatGateway"]: - """Gets all nat gateways in a resource group. + @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. Required. :type resource_group_name: str - :return: An iterator like instance of either NatGateway or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NatGateway] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. Required. + :type load_balancing_rule_name: str + :return: LoadBalancingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancingRule :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26149,57 +26430,170 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _request = build_nat_gateways_list_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancingRule] = kwargs.pop("cls", None) - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - 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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [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.http_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return AsyncItemPaged(get_next, extract_data) + return deserialized # type: ignore + + async def _health_initial( + self, group_name: str, load_balancer_name: str, load_balancing_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) -class NetworkInterfaceIPConfigurationsOperations: # pylint: disable=name-too-long + _request = build_load_balancer_load_balancing_rules_health_request( + group_name=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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_health( + self, group_name: str, load_balancer_name: str, load_balancing_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.LoadBalancerHealthPerRule]: + """Get health details of a load balancing rule. + + :param group_name: The name of the resource group. Required. + :type group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. Required. + :type load_balancing_rule_name: str + :return: An instance of AsyncLROPoller that returns either LoadBalancerHealthPerRule or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.LoadBalancerHealthPerRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerHealthPerRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._health_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + load_balancing_rule_name=load_balancing_rule_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("LoadBalancerHealthPerRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.LoadBalancerHealthPerRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.LoadBalancerHealthPerRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class LoadBalancerOutboundRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_interface_ip_configurations` attribute. + :attr:`load_balancer_outbound_rules` attribute. """ models = _models @@ -26213,27 +26607,25 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceIPConfiguration"]: - """Get all ip configurations in a network interface. + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterable["_models.OutboundRule"]: + """Gets all the outbound rules in a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either NetworkInterfaceIPConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterfaceIPConfiguration] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either OutboundRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.OutboundRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerOutboundRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26244,9 +26636,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_interface_ip_configurations_list_request( + _request = build_load_balancer_outbound_rules_list_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -26261,7 +26653,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceIPConfigurationListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerOutboundRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -26286,21 +26678,21 @@ async def get_next(next_link=None): @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. + 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. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. Required. - :type ip_configuration_name: str - :return: NetworkInterfaceIPConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param outbound_rule_name: The name of the outbound rule. Required. + :type outbound_rule_name: str + :return: OutboundRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.OutboundRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26311,13 +26703,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceIPConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.OutboundRule] = kwargs.pop("cls", None) - _request = build_network_interface_ip_configurations_get_request( + _request = build_load_balancer_outbound_rules_get_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - ip_configuration_name=ip_configuration_name, + load_balancer_name=load_balancer_name, + outbound_rule_name=outbound_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -26336,7 +26728,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("OutboundRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -26344,14 +26736,14 @@ async def get( return deserialized # type: ignore -class NetworkInterfaceLoadBalancersOperations: +class LoadBalancerNetworkInterfacesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_interface_load_balancers` attribute. + :attr:`load_balancer_network_interfaces` attribute. """ models = _models @@ -26365,25 +26757,25 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancer"]: - """List all load balancers in a network interface. + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterface"]: + """Gets associated load balancer network interfaces. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either NetworkInterface or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterface] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceLoadBalancerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26394,9 +26786,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_interface_load_balancers_list_request( + _request = build_load_balancer_network_interfaces_list_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -26411,7 +26803,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceLoadBalancerListResult", pipeline_response) + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -26435,14 +26827,162 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class NetworkInterfaceTapConfigurationsOperations: # pylint: disable=name-too-long +class LoadBalancerProbesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_interface_tap_configurations` attribute. + :attr:`load_balancer_probes` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> AsyncIterable["_models.Probe"]: + """Gets all the load balancer probes. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either Probe or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.Probe] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerProbeListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @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. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param probe_name: The name of the probe. Required. + :type probe_name: str + :return: Probe or the result of cls(response) + :rtype: ~azure.mgmt.network.models.Probe + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.Probe] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class NatGatewaysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`nat_gateways` attribute. """ models = _models @@ -26455,9 +26995,9 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial( - self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26468,13 +27008,12 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_interface_tap_configurations_delete_request( + _request = build_nat_gateways_delete_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_name, + nat_gateway_name=nat_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -26507,16 +27046,14 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified tap configuration from the NetworkInterface. + """Deletes the specified nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str :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: @@ -26524,7 +27061,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -26532,8 +27069,7 @@ async def begin_delete( 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, + nat_gateway_name=nat_gateway_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -26566,21 +27102,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :return: NetworkInterfaceTapConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26591,14 +27127,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) - _request = build_network_interface_tap_configurations_get_request( + _request = build_nat_gateways_get_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_name, + nat_gateway_name=nat_gateway_name, subscription_id=self._config.subscription_id, + expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -26616,7 +27152,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("NatGateway", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -26626,12 +27162,11 @@ async def get( async def _create_or_update_initial( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + nat_gateway_name: str, + parameters: Union[_models.NatGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26642,22 +27177,21 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(tap_configuration_parameters, (IOBase, bytes)): - _content = tap_configuration_parameters + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(tap_configuration_parameters, "NetworkInterfaceTapConfiguration") + _json = self._serialize.body(parameters, "NatGateway") - _request = build_network_interface_tap_configurations_create_or_update_request( + _request = build_nat_gateways_create_or_update_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_name, + nat_gateway_name=nat_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -26676,7 +27210,7 @@ async def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -26695,31 +27229,26 @@ async def _create_or_update_initial( async def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: _models.NetworkInterfaceTapConfiguration, + nat_gateway_name: str, + parameters: _models.NatGateway, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> AsyncLROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Required. - :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Required. + :type parameters: ~azure.mgmt.network.models.NatGateway :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26727,31 +27256,26 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: IO[bytes], + nat_gateway_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> AsyncLROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Required. - :type tap_configuration_parameters: IO[bytes] + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26759,45 +27283,38 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + nat_gateway_name: str, + parameters: Union[_models.NatGateway, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> AsyncLROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Is either a NetworkInterfaceTapConfiguration type or a IO[bytes] type. - Required. - :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Is either + a NatGateway type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NatGateway or IO[bytes] + :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + nat_gateway_name=nat_gateway_name, + parameters=parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, @@ -26809,7 +27326,7 @@ async def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceTapConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("NatGateway", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -26824,39 +27341,223 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.NetworkInterfaceTapConfiguration].from_continuation_token( + return AsyncLROPoller[_models.NatGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.NetworkInterfaceTapConfiguration]( + return AsyncLROPoller[_models.NatGateway]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @overload + async def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NatGateway: + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NatGateway: + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.NatGateway: + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Is either a TagsObject type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + @distributed_trace - def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceTapConfiguration"]: - """Get all Tap configurations in a network interface. + def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NatGateway"]: + """Gets all the Nat Gateways in a subscription. + + :return: An iterator like instance of either NatGateway or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NatGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @distributed_trace + def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NatGateway"]: + """Gets all nat gateways in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either NetworkInterfaceTapConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :return: An iterator like instance of either NatGateway or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceTapConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26867,9 +27568,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_interface_tap_configurations_list_request( + _request = build_nat_gateways_list_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -26884,7 +27584,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceTapConfigurationListResult", pipeline_response) + deserialized = self._deserialize("NatGatewayListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -26908,14 +27608,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class NetworkManagersOperations: +class NetworkInterfaceIPConfigurationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_managers` attribute. + :attr:`network_interface_ip_configurations` attribute. """ models = _models @@ -26927,19 +27627,29 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any) -> _models.NetworkManager: - """Gets the specified Network Manager. + @distributed_trace + def list( + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceIPConfiguration"]: + """Get all ip configurations in a network interface. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either NetworkInterfaceIPConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterfaceIPConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26947,114 +27657,66 @@ async def get(self, resource_group_name: str, network_manager_name: str, **kwarg } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) - - _request = build_network_managers_get_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response + def prepare_request(next_link=None): + if not next_link: - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + 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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - return deserialized # type: ignore + async def get_next(next_link=None): + _request = prepare_request(next_link) - @overload - async def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: _models.NetworkManager, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManager - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - @overload - async def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. + return pipeline_response - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ + return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.NetworkManager, IO[bytes]], - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. + 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. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Is either a - NetworkManager type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManager or IO[bytes] - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration name. Required. + :type ip_configuration_name: str + :return: NetworkInterfaceIPConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27062,29 +27724,18 @@ async def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkManager") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceIPConfiguration] = kwargs.pop("cls", None) - _request = build_network_managers_create_or_update_request( + _request = build_network_interface_ip_configurations_get_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -27097,102 +27748,867 @@ async def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + deserialized = self._deserialize("NetworkInterfaceIPConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _delete_initial( - self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_network_managers_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) +class NetworkInterfaceLoadBalancersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`network_interface_load_balancers` attribute. + """ - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + models = _models - return deserialized # type: ignore + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a network manager. + @distributed_trace + def list( + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancer"]: + """List all load balancers in a network interface. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceLoadBalancerListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class NetworkInterfaceTapConfigurationsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`network_interface_tap_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _delete_initial( + self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_interface_tap_configurations_delete_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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + 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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :return: NetworkInterfaceTapConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(tap_configuration_parameters, (IOBase, bytes)): + _content = tap_configuration_parameters + else: + _json = self._serialize.body(tap_configuration_parameters, "NetworkInterfaceTapConfiguration") + + _request = build_network_interface_tap_configurations_create_or_update_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, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: _models.NetworkInterfaceTapConfiguration, + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Required. + :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Required. + :type tap_configuration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @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: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Is either a NetworkInterfaceTapConfiguration type or a IO[bytes] type. + Required. + :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + or IO[bytes] + :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceTapConfiguration", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkInterfaceTapConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkInterfaceTapConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceTapConfiguration"]: + """Get all Tap configurations in a network interface. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either NetworkInterfaceTapConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceTapConfigurationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class NetworkManagersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`network_managers` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any) -> _models.NetworkManager: + """Gets the specified Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) + + _request = build_network_managers_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + parameters: _models.NetworkManager, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManager + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + parameters: Union[_models.NetworkManager, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. Is either a + NetworkManager type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManager or IO[bytes] + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "NetworkManager") + + _request = build_network_managers_create_or_update_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + + deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_managers_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + force=force, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a network manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -27297,7 +28713,7 @@ async def patch( :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27308,7 +28724,7 @@ async def patch( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) @@ -27372,10 +28788,10 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27449,10 +28865,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27531,7 +28947,7 @@ async def _post_initial( parameters: Union[_models.NetworkManagerCommit, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27542,7 +28958,7 @@ async def _post_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -27673,7 +29089,7 @@ async def begin_post( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerCommit] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -27828,7 +29244,7 @@ async def list( :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27839,7 +29255,7 @@ async def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerDeploymentStatusListResult] = kwargs.pop("cls", None) @@ -27967,7 +29383,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27978,7 +29394,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) @@ -28030,7 +29446,7 @@ async def get(self, network_manager_connection_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28041,7 +29457,7 @@ async def get(self, network_manager_connection_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) _request = build_subscription_network_manager_connections_get_request( @@ -28072,9 +29488,7 @@ async def get(self, network_manager_connection_name: str, **kwargs: Any) -> _mod return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, network_manager_connection_name: str, **kwargs: Any - ) -> None: + async def delete(self, network_manager_connection_name: str, **kwargs: Any) -> None: """Delete specified connection created by this subscription. :param network_manager_connection_name: Name for the network manager connection. Required. @@ -28083,7 +29497,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28094,7 +29508,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_subscription_network_manager_connections_delete_request( @@ -28143,10 +29557,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28293,7 +29707,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28304,7 +29718,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) @@ -28361,7 +29775,7 @@ async def get( :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28372,7 +29786,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) _request = build_management_group_network_manager_connections_get_request( @@ -28403,9 +29817,7 @@ async def get( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any - ) -> None: + async def delete(self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any) -> None: """Delete specified pending connection created by this management group. :param management_group_id: The management group Id which uniquely identify the Microsoft Azure @@ -28417,7 +29829,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28428,7 +29840,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_management_group_network_manager_connections_delete_request( @@ -28480,10 +29892,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28572,7 +29984,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28583,7 +29995,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) _request = build_connectivity_configurations_get_request( @@ -28704,7 +30116,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28715,7 +30127,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) @@ -28768,7 +30180,7 @@ async def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28779,7 +30191,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_connectivity_configurations_delete_request( @@ -28852,7 +30264,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -28926,10 +30338,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectivityConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29018,7 +30430,7 @@ async def get( :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29029,7 +30441,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) _request = build_network_groups_get_request( @@ -29161,7 +30573,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29172,7 +30584,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) @@ -29229,7 +30641,7 @@ async def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29240,7 +30652,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_groups_delete_request( @@ -29311,7 +30723,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -29383,10 +30795,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29482,7 +30894,7 @@ async def get( :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29493,7 +30905,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) _request = build_static_members_get_request( @@ -29617,7 +31029,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29628,7 +31040,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) @@ -29674,7 +31086,7 @@ async def create_or_update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, resource_group_name: str, network_manager_name: str, @@ -29696,7 +31108,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29704,57 +31116,167 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_static_members_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + network_group_name=network_group_name, + static_member_name=static_member_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 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, {}) # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.StaticMember"]: + """Lists the specified static member. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either StaticMember or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.StaticMember] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticMemberListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_static_members_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + network_group_name=network_group_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("StaticMemberListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) + return AsyncItemPaged(get_next, extract_data) - _request = build_static_members_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, - static_member_name=static_member_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) +class NetworkManagerRoutingConfigurationsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. - response = pipeline_response.http_response + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`network_manager_routing_configurations` attribute. + """ - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + models = _models - if cls: - return cls(pipeline_response, None, {}) # type: ignore + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( self, resource_group_name: str, network_manager_name: str, - network_group_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.StaticMember"]: - """Lists the specified static member. + ) -> AsyncIterable["_models.NetworkManagerRoutingConfiguration"]: + """Lists all the network manager routing configurations in a network manager, in a paginated + format. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -29763,17 +31285,19 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either StaticMember or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.StaticMember] + :return: An iterator like instance of either NetworkManagerRoutingConfiguration or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkManagerRoutingConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.StaticMemberListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerRoutingConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29784,10 +31308,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_static_members_list_request( + _request = build_network_manager_routing_configurations_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - network_group_name=network_group_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -29804,7 +31327,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("StaticMemberListResult", pipeline_response) + deserialized = self._deserialize("NetworkManagerRoutingConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -29827,52 +31350,93 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) + @distributed_trace_async + async def get( + self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any + ) -> _models.NetworkManagerRoutingConfiguration: + """Retrieves a network manager routing configuration. -class ScopeConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`scope_connections` attribute. - """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - models = _models + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + _request = build_network_manager_routing_configurations_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @overload async def create_or_update( self, resource_group_name: str, network_manager_name: str, - scope_connection_name: str, - parameters: _models.ScopeConnection, + configuration_name: str, + routing_configuration: _models.NetworkManagerRoutingConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Required. - :type parameters: ~azure.mgmt.network.models.ScopeConnection + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str + :param routing_configuration: The routing configuration to create or update. Required. + :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -29881,27 +31445,28 @@ async def create_or_update( self, resource_group_name: str, network_manager_name: str, - scope_connection_name: str, - parameters: IO[bytes], + configuration_name: str, + routing_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Required. - :type parameters: IO[bytes] + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str + :param routing_configuration: The routing configuration to create or update. Required. + :type routing_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -29910,26 +31475,28 @@ async def create_or_update( self, resource_group_name: str, network_manager_name: str, - scope_connection_name: str, - parameters: Union[_models.ScopeConnection, IO[bytes]], + configuration_name: str, + routing_configuration: Union[_models.NetworkManagerRoutingConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Is either a ScopeConnection type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.ScopeConnection or IO[bytes] - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str + :param routing_configuration: The routing configuration to create or update. Is either a + NetworkManagerRoutingConfiguration type or a IO[bytes] type. Required. + :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration or + IO[bytes] + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29940,22 +31507,22 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(routing_configuration, (IOBase, bytes)): + _content = routing_configuration else: - _json = self._serialize.body(parameters, "ScopeConnection") + _json = self._serialize.body(routing_configuration, "NetworkManagerRoutingConfiguration") - _request = build_scope_connections_create_or_update_request( + _request = build_network_manager_routing_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -29977,30 +31544,23 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace_async - async def get( - self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any - ) -> _models.ScopeConnection: - """Get specified scope connection created by this Network Manager. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + async def _delete_initial( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + *, + force: Optional[bool] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30011,189 +31571,128 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_scope_connections_get_request( + _request = build_network_manager_routing_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, + force=force, api_version=api_version, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any - ) -> None: - """Delete the pending scope connection created by this network manager. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_scope_connections_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 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, {}) # type: ignore - - @distributed_trace - def list( + async def begin_delete( self, resource_group_name: str, network_manager_name: str, + configuration_name: str, *, - top: Optional[int] = None, - skip_token: Optional[str] = None, + force: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.ScopeConnection"]: - """List all scope connections created by this network manager. + ) -> AsyncLROPoller[None]: + """Deletes a network manager routing configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either ScopeConnection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.ScopeConnection] + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ScopeConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_scope_connections_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - top=top, - skip_token=skip_token, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + force=force, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - async def extract_data(pipeline_response): - deserialized = self._deserialize("ScopeConnectionListResult", pipeline_response) - list_of_elem = deserialized.value + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) + return cls(pipeline_response, None, {}) # type: ignore - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityAdminConfigurationsOperations: +class RoutingRuleCollectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`security_admin_configurations` attribute. + :attr:`routing_rule_collections` attribute. """ models = _models @@ -30210,18 +31709,21 @@ def list( self, resource_group_name: str, network_manager_name: str, + configuration_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.SecurityAdminConfiguration"]: - """Lists all the network manager security admin configurations in a network manager, in a - paginated format. + ) -> AsyncIterable["_models.RoutingRuleCollection"]: + """Lists all the rule collections in a routing configuration, in a paginated format. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str + :param configuration_name: The name of the network manager Routing Configuration. Required. + :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -30230,19 +31732,19 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityAdminConfiguration or the result of + :return: An iterator like instance of either RoutingRuleCollection or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityAdminConfiguration] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.RoutingRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityAdminConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30253,9 +31755,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_admin_configurations_list_request( + _request = build_routing_rule_collections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -30272,7 +31775,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityAdminConfigurationListResult", pipeline_response) + deserialized = self._deserialize("RoutingRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -30297,21 +31800,30 @@ async def get_next(next_link=None): @distributed_trace_async async def get( - self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Retrieves a network manager security admin configuration. + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> _models.RoutingRuleCollection: + """Gets a network manager routing configuration rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30322,13 +31834,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) - _request = build_security_admin_configurations_get_request( + _request = build_routing_rule_collections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -30347,7 +31860,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -30360,27 +31873,31 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: _models.SecurityAdminConfiguration, + rule_collection_name: str, + rule_collection: _models.RoutingRuleCollection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. - Required. - :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -30390,27 +31907,31 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: IO[bytes], + rule_collection_name: str, + rule_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. - Required. - :type security_admin_configuration: IO[bytes] + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -30420,26 +31941,30 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: Union[_models.SecurityAdminConfiguration, IO[bytes]], + rule_collection_name: str, + rule_collection: Union[_models.RoutingRuleCollection, IO[bytes]], **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. Is - either a SecurityAdminConfiguration type or a IO[bytes] type. Required. - :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration or - IO[bytes] - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Is either a + RoutingRuleCollection type or a IO[bytes] type. Required. + :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection or IO[bytes] + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30450,22 +31975,23 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_admin_configuration, (IOBase, bytes)): - _content = security_admin_configuration + if isinstance(rule_collection, (IOBase, bytes)): + _content = rule_collection else: - _json = self._serialize.body(security_admin_configuration, "SecurityAdminConfiguration") + _json = self._serialize.body(rule_collection, "RoutingRuleCollection") - _request = build_security_admin_configurations_create_or_update_request( + _request = build_routing_rule_collections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -30487,7 +32013,7 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -30499,11 +32025,12 @@ async def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30514,13 +32041,14 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_admin_configurations_delete_request( + _request = build_routing_rule_collections_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -30562,18 +32090,23 @@ async def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a network manager security admin configuration. + """Deletes an routing rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -30585,7 +32118,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -30595,6 +32128,7 @@ async def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -30627,14 +32161,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class AdminRuleCollectionsOperations: +class RoutingRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`admin_rule_collections` attribute. + :attr:`routing_rules` attribute. """ models = _models @@ -30652,19 +32186,24 @@ def list( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.AdminRuleCollection"]: - """Lists all the rule collections in a security admin configuration, in a paginated format. + ) -> AsyncIterable["_models.RoutingRule"]: + """List all network manager routing configuration routing rules. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager routing Configuration rule + collection. Required. + :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -30673,17 +32212,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either AdminRuleCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.AdminRuleCollection] + :return: An iterator like instance of either RoutingRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.RoutingRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30694,10 +32233,11 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_admin_rule_collections_list_request( + _request = build_routing_rules_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -30714,7 +32254,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("AdminRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("RoutingRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -30744,24 +32284,28 @@ async def get( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, **kwargs: Any - ) -> _models.AdminRuleCollection: - """Gets a network manager security admin configuration rule collection. + ) -> _models.RoutingRule: + """Gets a network manager routing configuration routing rule. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30772,14 +32316,15 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) - _request = build_admin_rule_collections_get_request( + _request = build_routing_rules_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -30798,7 +32343,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -30812,29 +32357,33 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: _models.AdminRuleCollection, + rule_name: str, + routing_rule: _models.RoutingRule, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param routing_rule: The routing rule to create or update. Required. + :type routing_rule: ~azure.mgmt.network.models.RoutingRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -30845,29 +32394,33 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: IO[bytes], + rule_name: str, + routing_rule: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: IO[bytes] + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param routing_rule: The routing rule to create or update. Required. + :type routing_rule: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -30878,28 +32431,32 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: Union[_models.AdminRuleCollection, IO[bytes]], + rule_name: str, + routing_rule: Union[_models.RoutingRule, IO[bytes]], **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Is either a - AdminRuleCollection type or a IO[bytes] type. Required. - :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection or IO[bytes] - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param routing_rule: The routing rule to create or update. Is either a RoutingRule type or a + IO[bytes] type. Required. + :type routing_rule: ~azure.mgmt.network.models.RoutingRule or IO[bytes] + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30910,23 +32467,24 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(rule_collection, (IOBase, bytes)): - _content = rule_collection + if isinstance(routing_rule, (IOBase, bytes)): + _content = routing_rule else: - _json = self._serialize.body(rule_collection, "AdminRuleCollection") + _json = self._serialize.body(routing_rule, "RoutingRule") - _request = build_admin_rule_collections_create_or_update_request( + _request = build_routing_rules_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -30948,7 +32506,7 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -30961,11 +32519,12 @@ async def _delete_initial( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30976,14 +32535,15 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_admin_rule_collections_delete_request( + _request = build_routing_rules_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -31026,21 +32586,25 @@ async def begin_delete( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes an admin rule collection. + """Deletes a routing rule. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -31052,7 +32616,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -31063,6 +32627,7 @@ async def begin_delete( network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -31095,14 +32660,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class AdminRulesOperations: +class ScopeConnectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`admin_rules` attribute. + :attr:`scope_connections` attribute. """ models = _models @@ -31114,29 +32679,273 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @overload + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + scope_connection_name: str, + parameters: _models.ScopeConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Required. + :type parameters: ~azure.mgmt.network.models.ScopeConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + scope_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + scope_connection_name: str, + parameters: Union[_models.ScopeConnection, IO[bytes]], + **kwargs: Any + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Is either a ScopeConnection type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.ScopeConnection or IO[bytes] + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ScopeConnection") + + _request = build_scope_connections_create_or_update_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + scope_connection_name=scope_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + + deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get( + self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any + ) -> _models.ScopeConnection: + """Get specified scope connection created by this Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + + _request = build_scope_connections_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + scope_connection_name=scope_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any + ) -> None: + """Delete the pending scope connection created by this network manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scope_connections_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + scope_connection_name=scope_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 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, {}) # type: ignore + @distributed_trace def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.BaseAdminRule"]: - """List all network manager security configuration admin rules. + ) -> AsyncIterable["_models.ScopeConnection"]: + """List all scope connections created by this network manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -31145,17 +32954,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either BaseAdminRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.BaseAdminRule] + :return: An iterator like instance of either ScopeConnection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.ScopeConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ScopeConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31166,11 +32975,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_admin_rules_list_request( + _request = build_scope_connections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -31187,7 +32994,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("AdminRuleListResult", pipeline_response) + deserialized = self._deserialize("ScopeConnectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -31210,17 +33017,122 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @distributed_trace_async - async def get( + +class SecurityAdminConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`security_admin_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, **kwargs: Any - ) -> _models.BaseAdminRule: - """Gets a network manager security configuration admin rule. + ) -> AsyncIterable["_models.SecurityAdminConfiguration"]: + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either SecurityAdminConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityAdminConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityAdminConfigurationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_security_admin_configurations_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityAdminConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any + ) -> _models.SecurityAdminConfiguration: + """Retrieves a network manager security admin configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str @@ -31228,16 +33140,11 @@ async def get( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31248,15 +33155,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) - _request = build_admin_rules_get_request( + _request = build_security_admin_configurations_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -31273,9 +33178,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) + deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -31288,14 +33194,12 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: _models.BaseAdminRule, + security_admin_configuration: _models.SecurityAdminConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str @@ -31303,18 +33207,14 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Required. - :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule + :param security_admin_configuration: The security admin configuration to create or update. + Required. + :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -31324,14 +33224,12 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: IO[bytes], + security_admin_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str @@ -31339,18 +33237,14 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Required. - :type admin_rule: IO[bytes] + :param security_admin_configuration: The security admin configuration to create or update. + Required. + :type security_admin_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -31360,12 +33254,10 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: Union[_models.BaseAdminRule, IO[bytes]], + security_admin_configuration: Union[_models.SecurityAdminConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str @@ -31373,19 +33265,15 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Is either a BaseAdminRule type or a - IO[bytes] type. Required. - :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule or IO[bytes] - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :param security_admin_configuration: The security admin configuration to create or update. Is + either a SecurityAdminConfiguration type or a IO[bytes] type. Required. + :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration or + IO[bytes] + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31396,24 +33284,22 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) + cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(admin_rule, (IOBase, bytes)): - _content = admin_rule + if isinstance(security_admin_configuration, (IOBase, bytes)): + _content = security_admin_configuration else: - _json = self._serialize.body(admin_rule, "BaseAdminRule") + _json = self._serialize.body(security_admin_configuration, "SecurityAdminConfiguration") - _request = build_admin_rules_create_or_update_request( + _request = build_security_admin_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -31433,9 +33319,10 @@ async def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) + deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -31447,13 +33334,11 @@ async def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31464,15 +33349,13 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_admin_rules_delete_request( + _request = build_security_admin_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -31495,7 +33378,8 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: @@ -31514,13 +33398,11 @@ async def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes an admin rule. + """Deletes a network manager security admin configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str @@ -31528,11 +33410,6 @@ async def begin_delete( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -31544,7 +33421,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -31554,8 +33431,6 @@ async def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -31588,14 +33463,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityUserConfigurationsOperations: +class AdminRuleCollectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`security_user_configurations` attribute. + :attr:`admin_rule_collections` attribute. """ models = _models @@ -31612,19 +33487,20 @@ def list( self, resource_group_name: str, network_manager_name: str, + configuration_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.SecurityUserConfiguration"]: - """Lists all the network manager security user configurations in a network manager, in a paginated - format. + ) -> AsyncIterable["_models.AdminRuleCollection"]: + """Lists all the rule collections in a security admin configuration, in a paginated format. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -31633,19 +33509,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserConfiguration] + :return: An iterator like instance of either AdminRuleCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.AdminRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31656,9 +33530,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_configurations_list_request( + _request = build_admin_rule_collections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -31675,7 +33550,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserConfigurationListResult", pipeline_response) + deserialized = self._deserialize("AdminRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -31692,7 +33567,8 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -31700,22 +33576,29 @@ async def get_next(next_link=None): @distributed_trace_async async def get( - self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Retrieves a network manager security user configuration. + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> _models.AdminRuleCollection: + """Gets a network manager security admin configuration rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31726,13 +33609,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) - _request = build_security_user_configurations_get_request( + _request = build_admin_rule_collections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -31749,9 +33633,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -31764,28 +33649,30 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: _models.SecurityUserConfiguration, + rule_collection_name: str, + rule_collection: _models.AdminRuleCollection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. - Required. - :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -31795,28 +33682,30 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: IO[bytes], + rule_collection_name: str, + rule_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. - Required. - :type security_user_configuration: IO[bytes] + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -31826,27 +33715,29 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: Union[_models.SecurityUserConfiguration, IO[bytes]], + rule_collection_name: str, + rule_collection: Union[_models.AdminRuleCollection, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. Is - either a SecurityUserConfiguration type or a IO[bytes] type. Required. - :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration or - IO[bytes] - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. Is either a + AdminRuleCollection type or a IO[bytes] type. Required. + :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection or IO[bytes] + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31857,22 +33748,23 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_configuration, (IOBase, bytes)): - _content = security_user_configuration + if isinstance(rule_collection, (IOBase, bytes)): + _content = rule_collection else: - _json = self._serialize.body(security_user_configuration, "SecurityUserConfiguration") + _json = self._serialize.body(rule_collection, "AdminRuleCollection") - _request = build_security_user_configurations_create_or_update_request( + _request = build_admin_rule_collections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -31892,9 +33784,10 @@ async def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -31906,11 +33799,12 @@ async def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31921,13 +33815,14 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_configurations_delete_request( + _request = build_admin_rule_collections_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -31950,7 +33845,8 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: @@ -31969,19 +33865,22 @@ async def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a network manager security user configuration. + """Deletes an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -31993,7 +33892,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -32003,6 +33902,7 @@ async def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -32035,14 +33935,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityUserRuleCollectionsOperations: +class AdminRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`security_user_rule_collections` attribute. + :attr:`admin_rules` attribute. """ models = _models @@ -32060,21 +33960,23 @@ def list( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.SecurityUserRuleCollection"]: - """Lists all the security user rule collections in a security configuration, in a paginated - format. + ) -> AsyncIterable["_models.BaseAdminRule"]: + """List all network manager security configuration admin rules. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -32083,19 +33985,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserRuleCollection or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserRuleCollection] + :return: An iterator like instance of either BaseAdminRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.BaseAdminRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32106,10 +34006,11 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_rule_collections_list_request( + _request = build_admin_rules_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -32126,7 +34027,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("AdminRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -32143,7 +34044,8 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -32156,12 +34058,12 @@ async def get( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Gets a network manager security user configuration rule collection. + ) -> _models.BaseAdminRule: + """Gets a network manager security configuration admin rule. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str @@ -32170,11 +34072,13 @@ async def get( :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32185,14 +34089,15 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) - _request = build_security_user_rule_collections_get_request( + _request = build_admin_rules_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -32209,9 +34114,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -32225,15 +34131,15 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: _models.SecurityUserRuleCollection, + rule_name: str, + admin_rule: _models.BaseAdminRule, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str @@ -32242,14 +34148,15 @@ async def create_or_update( :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. - Required. - :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Required. + :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -32260,15 +34167,15 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: IO[bytes], + rule_name: str, + admin_rule: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str @@ -32277,14 +34184,15 @@ async def create_or_update( :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. - Required. - :type security_user_rule_collection: IO[bytes] + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Required. + :type admin_rule: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -32295,13 +34203,13 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: Union[_models.SecurityUserRuleCollection, IO[bytes]], + rule_name: str, + admin_rule: Union[_models.BaseAdminRule, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str @@ -32310,15 +34218,16 @@ async def create_or_update( :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. Is - either a SecurityUserRuleCollection type or a IO[bytes] type. Required. - :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection or - IO[bytes] - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Is either a BaseAdminRule type or a + IO[bytes] type. Required. + :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule or IO[bytes] + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32329,23 +34238,24 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_rule_collection, (IOBase, bytes)): - _content = security_user_rule_collection + if isinstance(admin_rule, (IOBase, bytes)): + _content = admin_rule else: - _json = self._serialize.body(security_user_rule_collection, "SecurityUserRuleCollection") + _json = self._serialize.body(admin_rule, "BaseAdminRule") - _request = build_security_user_rule_collections_create_or_update_request( + _request = build_admin_rules_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -32365,9 +34275,10 @@ async def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -32380,11 +34291,12 @@ async def _delete_initial( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32395,14 +34307,15 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_rule_collections_delete_request( + _request = build_admin_rules_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -32425,7 +34338,8 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: @@ -32445,14 +34359,14 @@ async def begin_delete( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a Security User Rule collection. + """Deletes an admin rule. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str @@ -32461,6 +34375,8 @@ async def begin_delete( :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -32472,7 +34388,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -32483,6 +34399,7 @@ async def begin_delete( network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -32515,14 +34432,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityUserRulesOperations: +class SecurityUserConfigurationsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`security_user_rules` attribute. + :attr:`security_user_configurations` attribute. """ models = _models @@ -32539,25 +34456,19 @@ def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.SecurityUserRule"]: - """Lists all Security User Rules in a rule collection. + ) -> AsyncIterable["_models.SecurityUserConfiguration"]: + """Lists all the network manager security user configurations in a network manager, in a paginated + format. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -32566,17 +34477,19 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserRule] + :return: An iterator like instance of either SecurityUserConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32587,11 +34500,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_rules_list_request( + _request = build_security_user_configurations_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -32608,7 +34519,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserRuleListResult", pipeline_response) + deserialized = self._deserialize("SecurityUserConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -32633,15 +34544,9 @@ async def get_next(next_link=None): @distributed_trace_async async def get( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - **kwargs: Any - ) -> _models.SecurityUserRule: - """Gets a security user rule. + self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any + ) -> _models.SecurityUserConfiguration: + """Retrieves a network manager security user configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -32650,16 +34555,11 @@ async def get( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32670,15 +34570,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) - _request = build_security_user_rules_get_request( + _request = build_security_user_configurations_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -32697,7 +34595,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -32710,14 +34608,12 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - security_user_rule: _models.SecurityUserRule, + security_user_configuration: _models.SecurityUserConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -32726,18 +34622,14 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param security_user_rule: The security user rule to create or update. Required. - :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule + :param security_user_configuration: The security user configuration to create or update. + Required. + :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -32747,14 +34639,12 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - security_user_rule: IO[bytes], + security_user_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -32763,18 +34653,14 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param security_user_rule: The security user rule to create or update. Required. - :type security_user_rule: IO[bytes] + :param security_user_configuration: The security user configuration to create or update. + Required. + :type security_user_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -32784,12 +34670,10 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, - security_user_rule: Union[_models.SecurityUserRule, IO[bytes]], + security_user_configuration: Union[_models.SecurityUserConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -32798,19 +34682,15 @@ async def create_or_update( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param security_user_rule: The security user rule to create or update. Is either a - SecurityUserRule type or a IO[bytes] type. Required. - :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule or IO[bytes] - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :param security_user_configuration: The security user configuration to create or update. Is + either a SecurityUserConfiguration type or a IO[bytes] type. Required. + :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration or + IO[bytes] + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32821,24 +34701,22 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_rule, (IOBase, bytes)): - _content = security_user_rule + if isinstance(security_user_configuration, (IOBase, bytes)): + _content = security_user_configuration else: - _json = self._serialize.body(security_user_rule, "SecurityUserRule") + _json = self._serialize.body(security_user_configuration, "SecurityUserConfiguration") - _request = build_security_user_rules_create_or_update_request( + _request = build_security_user_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -32860,7 +34738,7 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -32872,13 +34750,11 @@ async def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32889,15 +34765,13 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_rules_delete_request( + _request = build_security_user_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -32939,13 +34813,11 @@ async def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a security user rule. + """Deletes a network manager security user configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -32954,11 +34826,6 @@ async def begin_delete( :type network_manager_name: str :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -32970,7 +34837,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -32980,8 +34847,6 @@ async def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -33014,14 +34879,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class NetworkManagerRoutingConfigurationsOperations: # pylint: disable=name-too-long +class SecurityUserRuleCollectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_manager_routing_configurations` attribute. + :attr:`security_user_rule_collections` attribute. """ models = _models @@ -33038,12 +34903,13 @@ def list( self, resource_group_name: str, network_manager_name: str, + configuration_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.NetworkManagerRoutingConfiguration"]: - """Lists all the network manager routing configurations in a network manager, in a paginated + ) -> AsyncIterable["_models.SecurityUserRuleCollection"]: + """Lists all the security user rule collections in a security configuration, in a paginated format. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -33051,6 +34917,8 @@ def list( :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -33059,19 +34927,19 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either NetworkManagerRoutingConfiguration or the result - of cls(response) + :return: An iterator like instance of either SecurityUserRuleCollection or the result of + cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkManagerRoutingConfiguration] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerRoutingConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33082,9 +34950,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_manager_routing_configurations_list_request( + _request = build_security_user_rule_collections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -33101,7 +34970,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerRoutingConfigurationListResult", pipeline_response) + deserialized = self._deserialize("SecurityUserRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -33126,22 +34995,30 @@ async def get_next(next_link=None): @distributed_trace_async async def get( - self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Retrieves a network manager routing configuration. + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> _models.SecurityUserRuleCollection: + """Gets a network manager security user configuration rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33152,13 +35029,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) - _request = build_network_manager_routing_configurations_get_request( + _request = build_security_user_rule_collections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -33177,7 +35055,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -33190,27 +35068,32 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - routing_configuration: _models.NetworkManagerRoutingConfiguration, + rule_collection_name: str, + security_user_rule_collection: _models.SecurityUserRuleCollection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Required. - :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. + Required. + :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -33220,27 +35103,32 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - routing_configuration: IO[bytes], + rule_collection_name: str, + security_user_rule_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Required. - :type routing_configuration: IO[bytes] + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. + Required. + :type security_user_rule_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -33250,27 +35138,31 @@ async def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - routing_configuration: Union[_models.NetworkManagerRoutingConfiguration, IO[bytes]], + rule_collection_name: str, + security_user_rule_collection: Union[_models.SecurityUserRuleCollection, IO[bytes]], **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Is either a - NetworkManagerRoutingConfiguration type or a IO[bytes] type. Required. - :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration or + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. Is + either a SecurityUserRuleCollection type or a IO[bytes] type. Required. + :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection or IO[bytes] - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33281,22 +35173,23 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(routing_configuration, (IOBase, bytes)): - _content = routing_configuration + if isinstance(security_user_rule_collection, (IOBase, bytes)): + _content = security_user_rule_collection else: - _json = self._serialize.body(routing_configuration, "NetworkManagerRoutingConfiguration") + _json = self._serialize.body(security_user_rule_collection, "SecurityUserRuleCollection") - _request = build_network_manager_routing_configurations_create_or_update_request( + _request = build_security_user_rule_collections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -33318,7 +35211,7 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -33330,11 +35223,12 @@ async def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33345,13 +35239,14 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_manager_routing_configurations_delete_request( + _request = build_security_user_rule_collections_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -33393,19 +35288,23 @@ async def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a network manager routing configuration. + """Deletes a Security User Rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -33417,7 +35316,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -33427,6 +35326,7 @@ async def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -33459,14 +35359,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class RoutingRuleCollectionsOperations: +class SecurityUserRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`routing_rule_collections` attribute. + :attr:`security_user_rules` attribute. """ models = _models @@ -33484,20 +35384,24 @@ def list( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RoutingRuleCollection"]: - """Lists all the rule collections in a routing configuration, in a paginated format. + ) -> AsyncIterable["_models.SecurityUserRule"]: + """Lists all Security User Rules in a rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -33506,19 +35410,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either RoutingRuleCollection or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.RoutingRuleCollection] + :return: An iterator like instance of either SecurityUserRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityUserRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33529,10 +35431,11 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_routing_rule_collections_list_request( + _request = build_security_user_rules_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -33549,7 +35452,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("RoutingRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("SecurityUserRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -33579,25 +35482,28 @@ async def get( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Gets a network manager routing configuration rule collection. + ) -> _models.SecurityUserRule: + """Gets a security user rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33608,14 +35514,15 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) - _request = build_routing_rule_collections_get_request( + _request = build_security_user_rules_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -33634,7 +35541,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -33648,30 +35555,33 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: _models.RoutingRuleCollection, + rule_name: str, + security_user_rule: _models.SecurityUserRule, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Required. + :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -33682,30 +35592,33 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: IO[bytes], + rule_name: str, + security_user_rule: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: IO[bytes] + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Required. + :type security_user_rule: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -33716,29 +35629,32 @@ async def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_collection: Union[_models.RoutingRuleCollection, IO[bytes]], + rule_name: str, + security_user_rule: Union[_models.SecurityUserRule, IO[bytes]], **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Is either a - RoutingRuleCollection type or a IO[bytes] type. Required. - :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection or IO[bytes] - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Is either a + SecurityUserRule type or a IO[bytes] type. Required. + :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule or IO[bytes] + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33749,23 +35665,24 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(rule_collection, (IOBase, bytes)): - _content = rule_collection + if isinstance(security_user_rule, (IOBase, bytes)): + _content = security_user_rule else: - _json = self._serialize.body(rule_collection, "RoutingRuleCollection") + _json = self._serialize.body(security_user_rule, "SecurityUserRule") - _request = build_routing_rule_collections_create_or_update_request( + _request = build_security_user_rules_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -33787,7 +35704,7 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -33800,11 +35717,12 @@ async def _delete_initial( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33815,14 +35733,15 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_routing_rule_collections_delete_request( + _request = build_security_user_rules_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -33865,22 +35784,25 @@ async def begin_delete( network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes an routing rule collection. + """Deletes a security user rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -33892,7 +35814,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -33903,6 +35825,7 @@ async def begin_delete( network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, + rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -33935,14 +35858,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class RoutingRulesOperations: +class NetworkProfilesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`routing_rules` attribute. + :attr:`network_profiles` attribute. """ models = _models @@ -33954,49 +35877,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.RoutingRule"]: - """List all network manager routing configuration routing rules. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either RoutingRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.RoutingRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { + async def _delete_initial( + self, resource_group_name: str, network_profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34004,82 +35888,118 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _request = build_routing_rules_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - subscription_id=self._config.subscription_id, - top=top, - skip_token=skip_token, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _request = build_network_profiles_delete_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - async def extract_data(pipeline_response): - deserialized = self._deserialize("RoutingRuleListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return AsyncItemPaged(get_next, extract_data) + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + 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. Required. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. Required. + :type network_profile_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - **kwargs: Any - ) -> _models.RoutingRule: - """Gets a network manager routing configuration routing rule. + 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. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :param network_profile_name: The name of the public IP prefix. Required. + :type network_profile_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34090,16 +36010,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) - _request = build_routing_rules_get_request( + _request = build_network_profiles_get_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_profile_name=network_profile_name, subscription_id=self._config.subscription_id, + expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -34117,7 +36035,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) + deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -34128,36 +36046,26 @@ async def get( async def create_or_update( self, resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - routing_rule: _models.RoutingRule, + network_profile_name: str, + parameters: _models.NetworkProfile, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.NetworkProfile: + """Creates or updates a network profile. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Required. - :type routing_rule: ~azure.mgmt.network.models.RoutingRule + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + Required. + :type parameters: ~azure.mgmt.network.models.NetworkProfile :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile :raises ~azure.core.exceptions.HttpResponseError: """ @@ -34165,36 +36073,26 @@ async def create_or_update( async def create_or_update( self, resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - routing_rule: IO[bytes], + network_profile_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.NetworkProfile: + """Creates or updates a network profile. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Required. - :type routing_rule: IO[bytes] + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile :raises ~azure.core.exceptions.HttpResponseError: """ @@ -34202,35 +36100,24 @@ async def create_or_update( async def create_or_update( self, resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - routing_rule: Union[_models.RoutingRule, IO[bytes]], + network_profile_name: str, + parameters: Union[_models.NetworkProfile, IO[bytes]], **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.NetworkProfile: + """Creates or updates a network profile. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Is either a RoutingRule type or a - IO[bytes] type. Required. - :type routing_rule: ~azure.mgmt.network.models.RoutingRule or IO[bytes] - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. Is + either a NetworkProfile type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkProfile or IO[bytes] + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34241,24 +36128,21 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(routing_rule, (IOBase, bytes)): - _content = routing_rule + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(routing_rule, "RoutingRule") + _json = self._serialize.body(parameters, "NetworkProfile") - _request = build_routing_rules_create_or_update_request( + _request = build_network_profiles_create_or_update_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_profile_name=network_profile_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -34280,25 +36164,87 @@ async def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) + deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _delete_initial( + @overload + async def update_tags( self, resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, + network_profile_name: str, + parameters: _models.TagsObject, *, - force: Optional[bool] = None, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34306,142 +36252,190 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) - _request = build_routing_rules_delete_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + _request = build_network_profiles_update_tags_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_profile_name=network_profile_name, subscription_id=self._config.subscription_id, - force=force, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkProfile"]: + """Gets all the network profiles in a subscription. + + :return: An iterator like instance of either NetworkProfile or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - response = pipeline_response.http_response + 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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + _request = prepare_request(next_link) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if response.status_code not in [200]: + 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, deserialized, response_headers) # type: ignore + return pipeline_response - return deserialized # type: ignore + return AsyncItemPaged(get_next, extract_data) - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a routing rule. + @distributed_trace + def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkProfile"]: + """Gets all network profiles in a resource group. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An iterator like instance of either NetworkProfile or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkProfile] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, - force=force, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + return pipeline_response -class NetworkProfilesOperations: + return AsyncItemPaged(get_next, extract_data) + + +class NetworkSecurityGroupsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_profiles` attribute. + :attr:`network_security_groups` attribute. """ models = _models @@ -34454,9 +36448,9 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial( - self, resource_group_name: str, network_profile_name: str, **kwargs: Any + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34467,12 +36461,12 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_profiles_delete_request( + _request = build_network_security_groups_delete_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_security_group_name=network_security_group_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -34505,14 +36499,14 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, resource_group_name: str, network_profile_name: str, **kwargs: Any + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network profile. + """Deletes the specified network security group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the NetworkProfile. Required. - :type network_profile_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str :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: @@ -34520,7 +36514,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -34528,7 +36522,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_security_group_name=network_security_group_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -34561,21 +36555,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param network_profile_name: The name of the public IP prefix. Required. - :type network_profile_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str :keyword expand: Expands referenced resources. Default value is None. :paramtype expand: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34586,12 +36580,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) - _request = build_network_profiles_get_request( + _request = build_network_security_groups_get_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_security_group_name=network_security_group_name, subscription_id=self._config.subscription_id, expand=expand, api_version=api_version, @@ -34611,89 +36605,21 @@ async def get( 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.http_response) + deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def create_or_update( - self, - resource_group_name: str, - network_profile_name: str, - parameters: _models.NetworkProfile, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. - Required. - :type parameters: ~azure.mgmt.network.models.NetworkProfile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - network_profile_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( + async def _create_or_update_initial( self, resource_group_name: str, - network_profile_name: str, - parameters: Union[_models.NetworkProfile, IO[bytes]], + network_security_group_name: str, + parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. Is - either a NetworkProfile type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkProfile or IO[bytes] - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34704,9 +36630,9 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -34714,11 +36640,11 @@ async def create_or_update( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "NetworkProfile") + _json = self._serialize.body(parameters, "NetworkSecurityGroup") - _request = build_network_profiles_create_or_update_request( + _request = build_network_security_groups_create_or_update_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_security_group_name=network_security_group_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -34729,7 +36655,8 @@ async def create_or_update( ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -34737,39 +36664,171 @@ async def create_or_update( response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass 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.http_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: _models.NetworkSecurityGroup, + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Required. + :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Is either a NetworkSecurityGroup type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup or IO[bytes] + :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkSecurityGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkSecurityGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + @overload async def update_tags( self, resource_group_name: str, - network_profile_name: str, + network_security_group_name: str, parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Required. + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Required. :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ @@ -34777,25 +36836,25 @@ async def update_tags( async def update_tags( self, resource_group_name: str, - network_profile_name: str, + network_security_group_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Required. + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ @@ -34803,24 +36862,24 @@ async def update_tags( async def update_tags( self, resource_group_name: str, - network_profile_name: str, + network_security_group_name: str, parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Is either a TagsObject - type or a IO[bytes] type. Required. + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Is either a + TagsObject type or a IO[bytes] type. Required. :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34831,9 +36890,9 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -34843,9 +36902,9 @@ async def update_tags( else: _json = self._serialize.body(parameters, "TagsObject") - _request = build_network_profiles_update_tags_request( + _request = build_network_security_groups_update_tags_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_security_group_name=network_security_group_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -34867,7 +36926,7 @@ async def update_tags( 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.http_response) + deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -34875,20 +36934,22 @@ async def update_tags( return deserialized # type: ignore @distributed_trace - def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkProfile"]: - """Gets all the network profiles in a subscription. + def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkSecurityGroup"]: + """Gets all network security groups in a subscription. - :return: An iterator like instance of either NetworkProfile or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkProfile] + :return: An iterator like instance of either NetworkSecurityGroup or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34899,7 +36960,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkProfile"]: def prepare_request(next_link=None): if not next_link: - _request = build_network_profiles_list_all_request( + _request = build_network_security_groups_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -34914,7 +36975,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -34938,22 +36999,24 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkProfile"]: - """Gets all network profiles in a resource group. + def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkSecurityGroup"]: + """Gets all network security groups in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either NetworkProfile or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkProfile] + :return: An iterator like instance of either NetworkSecurityGroup or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34964,7 +37027,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model def prepare_request(next_link=None): if not next_link: - _request = build_network_profiles_list_request( + _request = build_network_security_groups_list_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, @@ -34980,7 +37043,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -35004,14 +37067,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class NetworkSecurityGroupsOperations: +class SecurityRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`network_security_groups` attribute. + :attr:`security_rules` attribute. """ models = _models @@ -35024,9 +37087,9 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35037,12 +37100,13 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_security_groups_delete_request( + _request = build_security_rules_delete_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, headers=_headers, @@ -35075,14 +37139,16 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security group. + """Deletes the specified network security rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_security_group_name: The name of the network security group. Required. :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str :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: @@ -35090,7 +37156,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -35099,6 +37165,7 @@ async def begin_delete( 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, headers=_headers, @@ -35131,21 +37198,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str :param network_security_group_name: The name of the network security group. Required. :type network_security_group_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :return: SecurityRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35156,14 +37223,14 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) - _request = build_network_security_groups_get_request( + _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, - expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -35181,7 +37248,7 @@ async def get( 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.http_response) + deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -35192,10 +37259,11 @@ async def _create_or_update_initial( self, resource_group_name: str, network_security_group_name: str, - parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + security_rule_name: str, + security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35206,21 +37274,22 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(security_rule_parameters, (IOBase, bytes)): + _content = security_rule_parameters else: - _json = self._serialize.body(parameters, "NetworkSecurityGroup") + _json = self._serialize.body(security_rule_parameters, "SecurityRule") - _request = build_network_security_groups_create_or_update_request( + _request = build_security_rules_create_or_update_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, content_type=content_type, @@ -35259,26 +37328,29 @@ async def begin_create_or_update( self, resource_group_name: str, network_security_group_name: str, - parameters: _models.NetworkSecurityGroup, + security_rule_name: str, + security_rule_parameters: _models.SecurityRule, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkSecurityGroup]: - """Creates or updates a network security group in the specified resource group. + ) -> 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. Required. :type resource_group_name: str :param network_security_group_name: The name of the network security group. Required. :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Required. - :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Required. + :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -35287,26 +37359,29 @@ async def begin_create_or_update( self, resource_group_name: str, network_security_group_name: str, - parameters: IO[bytes], + security_rule_name: str, + security_rule_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkSecurityGroup]: - """Creates or updates a network security group in the specified resource group. + ) -> 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. Required. :type resource_group_name: str :param network_security_group_name: The name of the network security group. Required. :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Required. - :type parameters: IO[bytes] + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Required. + :type security_rule_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -35315,147 +37390,590 @@ async def begin_create_or_update( self, resource_group_name: str, network_security_group_name: str, - parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + security_rule_name: str, + security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkSecurityGroup]: - """Creates or updates a network security group in the specified resource group. + ) -> 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Is either a SecurityRule type or a IO[bytes] type. Required. + :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule or IO[bytes] + :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SecurityRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SecurityRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SecurityRule"]: + """Gets all security rules in a network security group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :return: An iterator like instance of either SecurityRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class DefaultSecurityRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`default_security_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SecurityRule"]: + """Gets all default security rules in a network security group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :return: An iterator like instance of either SecurityRule or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param default_security_rule_name: The name of the default security rule. Required. + :type default_security_rule_name: str + :return: SecurityRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ReachabilityAnalysisIntentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`reachability_analysis_intents` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ReachabilityAnalysisIntent"]: + """Gets list of Reachability Analysis Intents . + + Gets list of Reachability Analysis Intents . + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either ReachabilityAnalysisIntent or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.ReachabilityAnalysisIntent] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisIntentListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reachability_analysis_intents_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ReachabilityAnalysisIntentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + **kwargs: Any + ) -> _models.ReachabilityAnalysisIntent: + """Get the Reachability Analysis Intent. + + Get the Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisIntent] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_intents_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Is either a NetworkSecurityGroup type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + deserialized = self._deserialize("ReachabilityAnalysisIntent", pipeline_response.http_response) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkSecurityGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkSecurityGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return deserialized # type: ignore @overload - async def update_tags( + async def create( self, resource_group_name: str, - network_security_group_name: str, - parameters: _models.TagsObject, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: _models.ReachabilityAnalysisIntent, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisIntent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def create( self, resource_group_name: str, - network_security_group_name: str, - parameters: IO[bytes], + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Required. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def update_tags( + async def create( self, resource_group_name: str, - network_security_group_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: Union[_models.ReachabilityAnalysisIntent, IO[bytes]], **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Is either a - TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Is either a + ReachabilityAnalysisIntent type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisIntent or IO[bytes] + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35466,21 +37984,23 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + cls: ClsType[_models.ReachabilityAnalysisIntent] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(parameters, "TagsObject") + _json = self._serialize.body(body, "ReachabilityAnalysisIntent") - _request = build_network_security_groups_update_tags_request( + _request = build_reachability_analysis_intents_create_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -35498,34 +38018,44 @@ async def update_tags( response = pipeline_response.http_response - if response.status_code not in [200]: + 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) + deserialized = self._deserialize("ReachabilityAnalysisIntent", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkSecurityGroup"]: - """Gets all network security groups in a subscription. + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + **kwargs: Any + ) -> None: + """Deletes Reachability Analysis Intent. - :return: An iterator like instance of either NetworkSecurityGroup or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + Deletes Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :return: None or the result of cls(response) + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35533,66 +38063,106 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkSecurityGroup } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _request = build_network_security_groups_list_all_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _request = build_reachability_analysis_intents_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - 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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - 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, {}) # type: ignore - return pipeline_response - return AsyncItemPaged(get_next, extract_data) +class ReachabilityAnalysisRunsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`reachability_analysis_runs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkSecurityGroup"]: - """Gets all network security groups in a resource group. + def list( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ReachabilityAnalysisRun"]: + """Gets list of Reachability Analysis Runs. + + Gets list of Reachability Analysis Runs. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either NetworkSecurityGroup or the result of + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either ReachabilityAnalysisRun or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.ReachabilityAnalysisRun] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisRunListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35603,9 +38173,16 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model def prepare_request(next_link=None): if not next_link: - _request = build_network_security_groups_list_request( + _request = build_reachability_analysis_runs_list_request( resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, api_version=api_version, headers=_headers, params=_params, @@ -35619,7 +38196,7 @@ def prepare_request(next_link=None): return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + deserialized = self._deserialize("ReachabilityAnalysisRunListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -35636,36 +38213,246 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Gets Reachability Analysis Run. -class SecurityRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + Gets Reachability Analysis Run. - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`security_rules` attribute. - """ + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - models = _models + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisRun] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_runs_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: _models.ReachabilityAnalysisRun, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: Union[_models.ReachabilityAnalysisRun, IO[bytes]], + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Is either a ReachabilityAnalysisRun + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisRun or IO[bytes] + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ReachabilityAnalysisRun] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ReachabilityAnalysisRun") + + _request = build_reachability_analysis_runs_create_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore async def _delete_initial( - self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35676,13 +38463,14 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_rules_delete_request( + _request = build_reachability_analysis_runs_delete_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -35698,33 +38486,47 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace_async async def begin_delete( - self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security rule. + """Deletes Reachability Analysis Run. + + Deletes Reachability Analysis Run. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str :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: @@ -35732,7 +38534,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -35740,8 +38542,9 @@ async def begin_delete( 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, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -35751,44 +38554,164 @@ async def begin_delete( await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class VerifierWorkspacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s + :attr:`verifier_workspaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.VerifierWorkspace"]: + """Gets list of Verifier Workspaces. + + Gets list of Verifier Workspaces. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either VerifierWorkspace or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.VerifierWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.VerifierWorkspaceListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_verifier_workspaces_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VerifierWorkspaceListResult", pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @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. + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> _models.VerifierWorkspace: + """Gets Verifier Workspace. + + Gets Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :return: SecurityRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityRule + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35799,13 +38722,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) - _request = build_security_rules_get_request( + _request = build_verifier_workspaces_get_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -35822,24 +38745,105 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _create_or_update_initial( + @overload + async def create( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + network_manager_name: str, + workspace_name: str, + body: _models.VerifierWorkspace, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Required. + :type body: ~azure.mgmt.network.models.VerifierWorkspace + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: Union[_models.VerifierWorkspace, IO[bytes]], + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Is either a VerifierWorkspace type or + a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.VerifierWorkspace or IO[bytes] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35850,22 +38854,22 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_rule_parameters, (IOBase, bytes)): - _content = security_rule_parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(security_rule_parameters, "SecurityRule") + _json = self._serialize.body(body, "VerifierWorkspace") - _request = build_security_rules_create_or_update_request( + _request = build_verifier_workspaces_create_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -35876,8 +38880,7 @@ async def _create_or_update_initial( ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -35885,14 +38888,11 @@ async def _create_or_update_initial( response = pipeline_response.http_response if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -35900,164 +38900,94 @@ async def _create_or_update_initial( return deserialized # type: ignore @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: _models.SecurityRule, + network_manager_name: str, + workspace_name: str, + body: Optional[_models.VerifierWorkspaceUpdate] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityRule]: - """Creates or updates a security rule in the specified network security group. + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. + + Updates Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Required. - :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Default value is None. + :type body: ~azure.mgmt.network.models.VerifierWorkspaceUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: IO[bytes], + network_manager_name: str, + workspace_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityRule]: - """Creates or updates a security rule in the specified network security group. + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. + + Updates Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Required. - :type security_rule_parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Default value is None. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_or_update( + async def update( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + network_manager_name: str, + workspace_name: str, + body: Optional[Union[_models.VerifierWorkspaceUpdate, IO[bytes]]] = None, **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. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Is either a SecurityRule type or a IO[bytes] type. Required. - :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.models.SecurityRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SecurityRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SecurityRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. - @distributed_trace - def list( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SecurityRule"]: - """Gets all security rules in a network security group. + Updates Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :return: An iterator like instance of either SecurityRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityRule] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Is either a VerifierWorkspaceUpdate + type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.VerifierWorkspaceUpdate or IO[bytes] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36065,157 +38995,61 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class DefaultSecurityRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.aio.NetworkManagementClient`'s - :attr:`default_security_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SecurityRule"]: - """Gets all default security rules in a network security group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :return: An iterator like instance of either SecurityRule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.models.SecurityRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "VerifierWorkspaceUpdate") else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _json = None - 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) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + _request = build_verifier_workspaces_update_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - async def get_next(next_link=None): - _request = prepare_request(next_link) + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + response = pipeline_response.http_response - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) - return AsyncItemPaged(get_next, extract_data) + if cls: + return cls(pipeline_response, deserialized, {}) # 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. + return deserialized # type: ignore - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. Required. - :type default_security_rule_name: str - :return: SecurityRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + async def _delete_initial( + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36226,13 +39060,13 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_default_security_rules_get_request( + _request = build_verifier_workspaces_delete_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - default_security_rule_name=default_security_rule_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -36240,24 +39074,95 @@ async def get( ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes Verifier Workspace. + + Deletes Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + class NetworkVirtualAppliancesOperations: """ @@ -36281,7 +39186,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36292,7 +39197,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_virtual_appliances_delete_request( @@ -36349,7 +39254,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -36409,7 +39314,7 @@ async def get( :rtype: ~azure.mgmt.network.models.NetworkVirtualAppliance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36420,7 +39325,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) _request = build_network_virtual_appliances_get_request( @@ -36528,7 +39433,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.NetworkVirtualAppliance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36539,7 +39444,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) @@ -36589,7 +39494,7 @@ async def _create_or_update_initial( parameters: Union[_models.NetworkVirtualAppliance, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36600,7 +39505,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -36733,7 +39638,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -36789,7 +39694,7 @@ async def _restart_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36800,7 +39705,7 @@ async def _restart_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -36946,7 +39851,7 @@ async def begin_restart( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualApplianceInstanceIds] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -37009,10 +39914,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37075,10 +39980,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.NetworkVirtualAppliance" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37150,7 +40055,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, site_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37161,7 +40066,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_appliance_sites_delete_request( @@ -37217,7 +40122,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -37273,7 +40178,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualApplianceSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37284,7 +40189,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualApplianceSite] = kwargs.pop("cls", None) _request = build_virtual_appliance_sites_get_request( @@ -37324,7 +40229,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualApplianceSite, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37335,7 +40240,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -37474,7 +40379,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualApplianceSite] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -37541,10 +40446,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSiteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37628,10 +40533,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.NetworkVirtualApplianceS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSkuListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37690,7 +40595,7 @@ async def get(self, sku_name: str, **kwargs: Any) -> _models.NetworkVirtualAppli :rtype: ~azure.mgmt.network.models.NetworkVirtualApplianceSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37701,7 +40606,7 @@ async def get(self, sku_name: str, **kwargs: Any) -> _models.NetworkVirtualAppli _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSku] = kwargs.pop("cls", None) _request = build_virtual_appliance_skus_get_request( @@ -37759,7 +40664,7 @@ async def _create_or_update_initial( parameters: Union[_models.InboundSecurityRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37770,7 +40675,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -37910,7 +40815,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.InboundSecurityRule] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -37974,7 +40879,7 @@ async def get( :rtype: ~azure.mgmt.network.models.InboundSecurityRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37985,7 +40890,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.InboundSecurityRule] = kwargs.pop("cls", None) _request = build_inbound_security_rule_get_request( @@ -38110,7 +41015,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38121,7 +41026,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) @@ -38177,7 +41082,7 @@ async def get(self, resource_group_name: str, network_watcher_name: str, **kwarg :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38188,7 +41093,7 @@ async def get(self, resource_group_name: str, network_watcher_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) _request = build_network_watchers_get_request( @@ -38223,7 +41128,7 @@ async def get(self, resource_group_name: str, network_watcher_name: str, **kwarg async def _delete_initial( self, resource_group_name: str, network_watcher_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38234,7 +41139,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_watchers_delete_request( @@ -38288,7 +41193,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -38400,7 +41305,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38411,7 +41316,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) @@ -38468,10 +41373,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcherListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38533,10 +41438,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.NetworkWatcher"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcherListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38659,7 +41564,7 @@ async def get_topology( :rtype: ~azure.mgmt.network.models.Topology :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38670,7 +41575,7 @@ async def get_topology( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Topology] = kwargs.pop("cls", None) @@ -38721,7 +41626,7 @@ async def _verify_ip_flow_initial( parameters: Union[_models.VerificationIPFlowParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38732,7 +41637,7 @@ async def _verify_ip_flow_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -38860,7 +41765,7 @@ async def begin_verify_ip_flow( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VerificationIPFlowResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -38913,7 +41818,7 @@ async def _get_next_hop_initial( parameters: Union[_models.NextHopParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38924,7 +41829,7 @@ async def _get_next_hop_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -39052,7 +41957,7 @@ async def begin_get_next_hop( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NextHopResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -39105,7 +42010,7 @@ async def _get_vm_security_rules_initial( parameters: Union[_models.SecurityGroupViewParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39116,7 +42021,7 @@ async def _get_vm_security_rules_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -39244,7 +42149,7 @@ async def begin_get_vm_security_rules( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityGroupViewResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -39297,7 +42202,7 @@ async def _get_troubleshooting_initial( parameters: Union[_models.TroubleshootingParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39308,7 +42213,7 @@ async def _get_troubleshooting_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -39436,7 +42341,7 @@ async def begin_get_troubleshooting( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TroubleshootingResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -39489,7 +42394,7 @@ async def _get_troubleshooting_result_initial( parameters: Union[_models.QueryTroubleshootingParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39500,7 +42405,7 @@ async def _get_troubleshooting_result_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -39630,7 +42535,7 @@ async def begin_get_troubleshooting_result( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TroubleshootingResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -39683,7 +42588,7 @@ async def _set_flow_log_configuration_initial( parameters: Union[_models.FlowLogInformation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39694,7 +42599,7 @@ async def _set_flow_log_configuration_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -39822,7 +42727,7 @@ async def begin_set_flow_log_configuration( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLogInformation] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -39875,7 +42780,7 @@ async def _get_flow_log_status_initial( parameters: Union[_models.FlowLogStatusParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39886,7 +42791,7 @@ async def _get_flow_log_status_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -40016,7 +42921,7 @@ async def begin_get_flow_log_status( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLogInformation] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -40069,7 +42974,7 @@ async def _check_connectivity_initial( parameters: Union[_models.ConnectivityParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40080,7 +42985,7 @@ async def _check_connectivity_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -40213,7 +43118,7 @@ async def begin_check_connectivity( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectivityInformation] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -40266,7 +43171,7 @@ async def _get_azure_reachability_report_initial( parameters: Union[_models.AzureReachabilityReportParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40277,7 +43182,7 @@ async def _get_azure_reachability_report_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -40411,7 +43316,7 @@ async def begin_get_azure_reachability_report( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureReachabilityReport] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -40464,7 +43369,7 @@ async def _list_available_providers_initial( parameters: Union[_models.AvailableProvidersListParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40475,7 +43380,7 @@ async def _list_available_providers_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -40606,7 +43511,7 @@ async def begin_list_available_providers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AvailableProvidersList] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -40659,7 +43564,7 @@ async def _get_network_configuration_diagnostic_initial( # pylint: disable=name parameters: Union[_models.NetworkConfigurationDiagnosticParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40670,7 +43575,7 @@ async def _get_network_configuration_diagnostic_initial( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -40814,7 +43719,7 @@ async def begin_get_network_configuration_diagnostic( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkConfigurationDiagnosticResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -40888,7 +43793,7 @@ async def _create_initial( parameters: Union[_models.PacketCapture, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40899,7 +43804,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -41037,7 +43942,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PacketCaptureResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -41101,7 +44006,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PacketCaptureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41112,7 +44017,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureResult] = kwargs.pop("cls", None) _request = build_packet_captures_get_request( @@ -41148,7 +44053,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41159,7 +44064,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_delete_request( @@ -41216,7 +44121,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -41259,7 +44164,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _stop_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41270,7 +44175,7 @@ async def _stop_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_stop_request( @@ -41327,7 +44232,7 @@ async def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -41370,7 +44275,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _get_status_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41381,7 +44286,7 @@ async def _get_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_get_status_request( @@ -41440,7 +44345,7 @@ async def begin_get_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureQueryStatusResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -41501,10 +44406,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41586,7 +44491,7 @@ async def _create_or_update_initial( migrate: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41597,7 +44502,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -41754,7 +44659,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -41820,7 +44725,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ConnectionMonitorResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41831,7 +44736,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) _request = build_connection_monitors_get_request( @@ -41867,7 +44772,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41878,7 +44783,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_delete_request( @@ -41936,7 +44841,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -42058,7 +44963,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ConnectionMonitorResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42069,7 +44974,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) @@ -42117,7 +45022,7 @@ async def update_tags( async def _stop_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42128,7 +45033,7 @@ async def _stop_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_stop_request( @@ -42186,7 +45091,7 @@ async def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -42229,7 +45134,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42240,7 +45145,7 @@ async def _start_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_start_request( @@ -42298,7 +45203,7 @@ async def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -42341,7 +45246,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _query_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42352,7 +45257,7 @@ async def _query_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_query_request( @@ -42412,7 +45317,7 @@ async def begin_query( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorQueryResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -42476,10 +45381,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42559,7 +45464,7 @@ async def _create_or_update_initial( parameters: Union[_models.FlowLog, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42570,7 +45475,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -42708,7 +45613,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -42838,7 +45743,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.FlowLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42849,7 +45754,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) @@ -42910,7 +45815,7 @@ async def get( :rtype: ~azure.mgmt.network.models.FlowLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42921,7 +45826,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) _request = build_flow_logs_get_request( @@ -42957,7 +45862,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, network_watcher_name: str, flow_log_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42968,7 +45873,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_flow_logs_delete_request( @@ -43025,7 +45930,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -43083,10 +45988,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FlowLogListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43169,10 +46074,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43243,7 +46148,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, private_endpoint_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43254,7 +46159,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_private_endpoints_delete_request( @@ -43308,7 +46213,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -43363,7 +46268,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PrivateEndpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43374,7 +46279,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpoint] = kwargs.pop("cls", None) _request = build_private_endpoints_get_request( @@ -43414,7 +46319,7 @@ async def _create_or_update_initial( parameters: Union[_models.PrivateEndpoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43425,7 +46330,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -43555,7 +46460,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpoint] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -43615,10 +46520,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43680,10 +46585,10 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.PrivateE _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43769,10 +46674,10 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Available _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailablePrivateEndpointTypesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43842,10 +46747,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailablePrivateEndpointTypesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43919,7 +46824,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, private_endpoint_name: str, private_dns_zone_group_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43930,7 +46835,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_private_dns_zone_groups_delete_request( @@ -43986,7 +46891,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -44042,7 +46947,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PrivateDnsZoneGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44053,7 +46958,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateDnsZoneGroup] = kwargs.pop("cls", None) _request = build_private_dns_zone_groups_get_request( @@ -44093,7 +46998,7 @@ async def _create_or_update_initial( parameters: Union[_models.PrivateDnsZoneGroup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44104,7 +47009,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -44243,7 +47148,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateDnsZoneGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -44308,10 +47213,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateDnsZoneGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44384,7 +47289,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44395,7 +47300,7 @@ async def _delete_initial(self, resource_group_name: str, service_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_private_link_services_delete_request( @@ -44447,7 +47352,7 @@ async def begin_delete(self, resource_group_name: str, service_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -44502,7 +47407,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PrivateLinkService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44513,7 +47418,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkService] = kwargs.pop("cls", None) _request = build_private_link_services_get_request( @@ -44553,7 +47458,7 @@ async def _create_or_update_initial( parameters: Union[_models.PrivateLinkService, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44564,7 +47469,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -44694,7 +47599,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkService] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -44754,10 +47659,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44819,10 +47724,10 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.PrivateL _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44897,7 +47802,7 @@ async def get_private_endpoint_connection( :rtype: ~azure.mgmt.network.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44908,7 +47813,7 @@ async def get_private_endpoint_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) _request = build_private_link_services_get_private_endpoint_connection_request( @@ -45026,7 +47931,7 @@ async def update_private_endpoint_connection( :rtype: ~azure.mgmt.network.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45037,7 +47942,7 @@ async def update_private_endpoint_connection( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -45085,7 +47990,7 @@ async def update_private_endpoint_connection( async def _delete_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, service_name: str, pe_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45096,7 +48001,7 @@ async def _delete_private_endpoint_connection_initial( # pylint: disable=name-t _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_private_link_services_delete_private_endpoint_connection_request( @@ -45153,7 +48058,7 @@ async def begin_delete_private_endpoint_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -45212,10 +48117,10 @@ def list_private_endpoint_connections( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45273,7 +48178,7 @@ async def _check_private_link_service_visibility_initial( # pylint: disable=nam parameters: Union[_models.CheckPrivateLinkServiceVisibilityRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45284,7 +48189,7 @@ async def _check_private_link_service_visibility_initial( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -45400,7 +48305,7 @@ async def begin_check_private_link_service_visibility( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkServiceVisibility] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -45452,7 +48357,7 @@ async def _check_private_link_service_visibility_by_resource_group_initial( # p parameters: Union[_models.CheckPrivateLinkServiceVisibilityRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45463,7 +48368,7 @@ async def _check_private_link_service_visibility_by_resource_group_initial( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -45597,7 +48502,7 @@ async def begin_check_private_link_service_visibility_by_resource_group( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkServiceVisibility] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -45661,10 +48566,10 @@ def list_auto_approved_private_link_services( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AutoApprovedPrivateLinkServicesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45734,10 +48639,10 @@ def list_auto_approved_private_link_services_by_resource_group( # pylint: disab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AutoApprovedPrivateLinkServicesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45813,7 +48718,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, public_ip_prefix_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45824,7 +48729,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_prefixes_delete_request( @@ -45877,7 +48782,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -45932,7 +48837,7 @@ async def get( :rtype: ~azure.mgmt.network.models.PublicIPPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45943,7 +48848,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) _request = build_public_ip_prefixes_get_request( @@ -45982,7 +48887,7 @@ async def _create_or_update_initial( parameters: Union[_models.PublicIPPrefix, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45993,7 +48898,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -46122,7 +49027,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -46241,7 +49146,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.PublicIPPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46252,7 +49157,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) @@ -46306,10 +49211,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.PublicIPPrefix"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46371,10 +49276,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46447,7 +49352,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, route_filter_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46458,7 +49363,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_route_filters_delete_request( @@ -46518,7 +49423,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -46574,7 +49479,7 @@ async def get( :rtype: ~azure.mgmt.network.models.RouteFilter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46585,7 +49490,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) _request = build_route_filters_get_request( @@ -46624,7 +49529,7 @@ async def _create_or_update_initial( route_filter_parameters: Union[_models.RouteFilter, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46635,7 +49540,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -46764,7 +49669,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -46884,7 +49789,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.RouteFilter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46895,7 +49800,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) @@ -46951,10 +49856,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47015,10 +49920,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.RouteFilter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47090,7 +49995,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, route_filter_name: str, rule_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47101,7 +50006,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_route_filter_rules_delete_request( @@ -47164,7 +50069,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -47221,7 +50126,7 @@ async def get( :rtype: ~azure.mgmt.network.models.RouteFilterRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47232,7 +50137,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterRule] = kwargs.pop("cls", None) _request = build_route_filter_rules_get_request( @@ -47272,7 +50177,7 @@ async def _create_or_update_initial( route_filter_rule_parameters: Union[_models.RouteFilterRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47283,7 +50188,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -47422,7 +50327,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilterRule] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -47487,10 +50392,10 @@ def list_by_route_filter( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47564,7 +50469,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, route_table_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47575,7 +50480,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_route_tables_delete_request( @@ -47628,7 +50533,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -47683,7 +50588,7 @@ async def get( :rtype: ~azure.mgmt.network.models.RouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47694,7 +50599,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) _request = build_route_tables_get_request( @@ -47733,7 +50638,7 @@ async def _create_or_update_initial( parameters: Union[_models.RouteTable, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47744,7 +50649,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -47871,7 +50776,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -47991,7 +50896,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.RouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48002,7 +50907,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) @@ -48058,10 +50963,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTableListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48122,10 +51027,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RouteTable"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTableListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48197,7 +51102,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, route_table_name: str, route_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48208,7 +51113,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_routes_delete_request( @@ -48264,7 +51169,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -48320,7 +51225,7 @@ async def get( :rtype: ~azure.mgmt.network.models.Route :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48331,7 +51236,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.Route] = kwargs.pop("cls", None) _request = build_routes_get_request( @@ -48371,7 +51276,7 @@ async def _create_or_update_initial( route_parameters: Union[_models.Route, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48382,7 +51287,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -48516,7 +51421,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Route] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -48579,10 +51484,10 @@ def list(self, resource_group_name: str, route_table_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48656,7 +51561,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, security_partner_provider_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48667,7 +51572,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_security_partner_providers_delete_request( @@ -48720,7 +51625,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -48773,7 +51678,7 @@ async def get( :rtype: ~azure.mgmt.network.models.SecurityPartnerProvider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48784,7 +51689,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) _request = build_security_partner_providers_get_request( @@ -48822,7 +51727,7 @@ async def _create_or_update_initial( parameters: Union[_models.SecurityPartnerProvider, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48833,7 +51738,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -48962,7 +51867,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -49082,7 +51987,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.SecurityPartnerProvider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49093,7 +51998,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) @@ -49153,10 +52058,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49219,10 +52124,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.SecurityPartnerProvider" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49302,10 +52207,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.BgpServiceCommunity"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpServiceCommunityListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49377,7 +52282,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, service_endpoint_policy_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49388,7 +52293,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_service_endpoint_policies_delete_request( @@ -49441,7 +52346,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -49501,7 +52406,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49512,7 +52417,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) _request = build_service_endpoint_policies_get_request( @@ -49551,7 +52456,7 @@ async def _create_or_update_initial( parameters: Union[_models.ServiceEndpointPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49562,7 +52467,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -49691,7 +52596,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -49811,7 +52716,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49822,7 +52727,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) @@ -49878,10 +52783,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ServiceEndpointPolicy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49947,10 +52852,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50027,7 +52932,7 @@ async def _delete_initial( service_endpoint_policy_definition_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50038,7 +52943,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_service_endpoint_policy_definitions_delete_request( @@ -50099,7 +53004,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -50160,7 +53065,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50171,7 +53076,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyDefinition] = kwargs.pop("cls", None) _request = build_service_endpoint_policy_definitions_get_request( @@ -50211,7 +53116,7 @@ async def _create_or_update_initial( service_endpoint_policy_definitions: Union[_models.ServiceEndpointPolicyDefinition, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50222,7 +53127,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -50373,7 +53278,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicyDefinition] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -50440,10 +53345,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50526,7 +53431,7 @@ async def list(self, location: str, **kwargs: Any) -> _models.ServiceTagsListRes :rtype: ~azure.mgmt.network.models.ServiceTagsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50537,7 +53442,7 @@ async def list(self, location: str, **kwargs: Any) -> _models.ServiceTagsListRes _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceTagsListResult] = kwargs.pop("cls", None) _request = build_service_tags_list_request( @@ -50616,10 +53521,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceTagInformationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50704,10 +53609,10 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50780,7 +53685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, virtual_network_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50791,7 +53696,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_networks_delete_request( @@ -50844,7 +53749,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -50899,7 +53804,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50910,7 +53815,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) _request = build_virtual_networks_get_request( @@ -50949,7 +53854,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualNetwork, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50960,7 +53865,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -51089,7 +53994,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -51209,7 +54114,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VirtualNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51220,7 +54125,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) @@ -51274,10 +54179,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualNetwork"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51339,10 +54244,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51408,7 +54313,7 @@ async def check_ip_address_availability( :rtype: ~azure.mgmt.network.models.IPAddressAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51419,7 +54324,7 @@ async def check_ip_address_availability( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.IPAddressAvailabilityResult] = kwargs.pop("cls", None) _request = build_virtual_networks_check_ip_address_availability_request( @@ -51468,10 +54373,10 @@ def list_usage( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListUsageResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51531,7 +54436,7 @@ async def _list_ddos_protection_status_initial( skip_token: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51542,7 +54447,7 @@ async def _list_ddos_protection_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_networks_list_ddos_protection_status_request( @@ -51590,6 +54495,7 @@ async def begin_list_ddos_protection_status( skip_token: Optional[str] = None, **kwargs: Any ) -> AsyncLROPoller[AsyncIterable["_models.PublicIpDdosProtectionStatusResult"]]: + # pylint: disable=line-too-long """Gets the Ddos Protection Status of all IP Addresses under the Virtual Network. :param resource_group_name: The name of the resource group. Required. @@ -51610,10 +54516,10 @@ async def begin_list_ddos_protection_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkDdosProtectionStatusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51734,7 +54640,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, virtual_network_name: str, subnet_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51745,7 +54651,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_subnets_delete_request( @@ -51801,7 +54707,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -51865,7 +54771,7 @@ async def get( :rtype: ~azure.mgmt.network.models.Subnet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51876,7 +54782,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.Subnet] = kwargs.pop("cls", None) _request = build_subnets_get_request( @@ -51917,7 +54823,7 @@ async def _create_or_update_initial( subnet_parameters: Union[_models.Subnet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51928,7 +54834,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -52067,7 +54973,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Subnet] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -52123,7 +55029,7 @@ async def _prepare_network_policies_initial( prepare_network_policies_request_parameters: Union[_models.PrepareNetworkPoliciesRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52134,7 +55040,7 @@ async def _prepare_network_policies_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -52273,7 +55179,7 @@ async def begin_prepare_network_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -52324,7 +55230,7 @@ async def _unprepare_network_policies_initial( unprepare_network_policies_request_parameters: Union[_models.UnprepareNetworkPoliciesRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52335,7 +55241,7 @@ async def _unprepare_network_policies_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -52476,7 +55382,7 @@ async def begin_unprepare_network_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -52536,10 +55442,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SubnetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52626,7 +55532,7 @@ async def list( :rtype: ~azure.mgmt.network.models.ResourceNavigationLinksListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52637,7 +55543,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ResourceNavigationLinksListResult] = kwargs.pop("cls", None) _request = build_resource_navigation_links_list_request( @@ -52705,7 +55611,7 @@ async def list( :rtype: ~azure.mgmt.network.models.ServiceAssociationLinksListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52716,7 +55622,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceAssociationLinksListResult] = kwargs.pop("cls", None) _request = build_service_association_links_list_request( @@ -52771,7 +55677,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, virtual_network_name: str, virtual_network_peering_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52782,7 +55688,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_peerings_delete_request( @@ -52838,7 +55744,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -52894,7 +55800,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52905,7 +55811,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkPeering] = kwargs.pop("cls", None) _request = build_virtual_network_peerings_get_request( @@ -52947,7 +55853,7 @@ async def _create_or_update_initial( sync_remote_address_space: Optional[Union[str, _models.SyncRemoteAddressSpace]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52958,7 +55864,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -53113,7 +56019,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkPeering] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -53181,10 +56087,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53262,7 +56168,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualNetworkGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53273,7 +56179,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -53402,7 +56308,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -53463,7 +56369,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53474,7 +56380,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_request( @@ -53508,7 +56414,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53519,7 +56425,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_delete_request( @@ -53572,7 +56478,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -53618,7 +56524,7 @@ async def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53629,7 +56535,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -53756,7 +56662,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -53818,10 +56724,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53890,10 +56796,10 @@ def list_connections( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayListConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53952,7 +56858,7 @@ async def _reset_initial( gateway_vip: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53963,7 +56869,7 @@ async def _reset_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_reset_request( @@ -54026,7 +56932,7 @@ async def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54073,7 +56979,7 @@ def get_long_running_output(pipeline_response): async def _reset_vpn_client_shared_key_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54084,7 +56990,7 @@ async def _reset_vpn_client_shared_key_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_reset_vpn_client_shared_key_request( @@ -54138,7 +57044,7 @@ async def begin_reset_vpn_client_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54184,7 +57090,7 @@ async def _generatevpnclientpackage_initial( parameters: Union[_models.VpnClientParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54195,7 +57101,7 @@ async def _generatevpnclientpackage_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -54324,7 +57230,7 @@ async def begin_generatevpnclientpackage( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -54375,7 +57281,7 @@ async def _generate_vpn_profile_initial( parameters: Union[_models.VpnClientParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54386,7 +57292,7 @@ async def _generate_vpn_profile_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -54515,7 +57421,7 @@ async def begin_generate_vpn_profile( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -54562,7 +57468,7 @@ def get_long_running_output(pipeline_response): async def _get_vpn_profile_package_url_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54573,7 +57479,7 @@ async def _get_vpn_profile_package_url_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpn_profile_package_url_request( @@ -54627,7 +57533,7 @@ async def begin_get_vpn_profile_package_url( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54671,7 +57577,7 @@ def get_long_running_output(pipeline_response): async def _get_bgp_peer_status_initial( self, resource_group_name: str, virtual_network_gateway_name: str, *, peer: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54682,7 +57588,7 @@ async def _get_bgp_peer_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_bgp_peer_status_request( @@ -54739,7 +57645,7 @@ async def begin_get_bgp_peer_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpPeerStatusListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54797,7 +57703,7 @@ async def supported_vpn_devices( :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54808,7 +57714,7 @@ async def supported_vpn_devices( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_supported_vpn_devices_request( @@ -54842,7 +57748,7 @@ async def supported_vpn_devices( async def _get_learned_routes_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54853,7 +57759,7 @@ async def _get_learned_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_learned_routes_request( @@ -54908,7 +57814,7 @@ async def begin_get_learned_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.GatewayRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54954,7 +57860,7 @@ def get_long_running_output(pipeline_response): async def _get_advertised_routes_initial( self, resource_group_name: str, virtual_network_gateway_name: str, *, peer: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54965,7 +57871,7 @@ async def _get_advertised_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_advertised_routes_request( @@ -55023,7 +57929,7 @@ async def begin_get_advertised_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.GatewayRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -55074,7 +57980,7 @@ async def _set_vpnclient_ipsec_parameters_initial( vpnclient_ipsec_params: Union[_models.VpnClientIPsecParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55085,7 +57991,7 @@ async def _set_vpnclient_ipsec_parameters_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -55218,7 +58124,7 @@ async def begin_set_vpnclient_ipsec_parameters( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnClientIPsecParameters] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -55267,7 +58173,7 @@ def get_long_running_output(pipeline_response): async def _get_vpnclient_ipsec_parameters_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55278,7 +58184,7 @@ async def _get_vpnclient_ipsec_parameters_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request( @@ -55334,7 +58240,7 @@ async def begin_get_vpnclient_ipsec_parameters( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnClientIPsecParameters] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -55453,7 +58359,7 @@ async def vpn_device_configuration_script( :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55464,7 +58370,7 @@ async def vpn_device_configuration_script( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) @@ -55514,7 +58420,7 @@ async def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55525,7 +58431,7 @@ async def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -55656,7 +58562,7 @@ async def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -55707,7 +58613,7 @@ async def _stop_packet_capture_initial( parameters: Union[_models.VpnPacketCaptureStopParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55718,7 +58624,7 @@ async def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -55846,7 +58752,7 @@ async def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -55890,10 +58796,594 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _get_failover_all_test_details_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + type: str, + fetch_latest: bool, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_get_failover_all_test_details_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + type=type, + fetch_latest=fetch_latest, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_get_failover_all_test_details( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + type: str, + fetch_latest: bool, + **kwargs: Any + ) -> AsyncLROPoller[List[_models.ExpressRouteFailoverTestDetails]]: + """This operation retrieves the details of all the failover tests performed on the gateway for + different peering locations. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword type: The type of failover test. Required. + :paramtype type: str + :keyword fetch_latest: Fetch only the latest tests for each peering location. Required. + :paramtype fetch_latest: bool + :return: An instance of AsyncLROPoller that returns either list of + ExpressRouteFailoverTestDetails or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.network.models.ExpressRouteFailoverTestDetails]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[List[_models.ExpressRouteFailoverTestDetails]] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_failover_all_test_details_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + type=type, + fetch_latest=fetch_latest, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ExpressRouteFailoverTestDetails]", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[List[_models.ExpressRouteFailoverTestDetails]].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[List[_models.ExpressRouteFailoverTestDetails]]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _get_failover_single_test_details_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + peering_location: str, + failover_test_id: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_get_failover_single_test_details_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + peering_location=peering_location, + failover_test_id=failover_test_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_get_failover_single_test_details( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + peering_location: str, + failover_test_id: str, + **kwargs: Any + ) -> AsyncLROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]]: + """This operation retrieves the details of a particular failover test performed on the gateway + based on the test Guid. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword peering_location: Peering location of the test. Required. + :paramtype peering_location: str + :keyword failover_test_id: The unique Guid value which identifies the test. Required. + :paramtype failover_test_id: str + :return: An instance of AsyncLROPoller that returns either list of + ExpressRouteFailoverSingleTestDetails or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.network.models.ExpressRouteFailoverSingleTestDetails]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[List[_models.ExpressRouteFailoverSingleTestDetails]] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_failover_single_test_details_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peering_location=peering_location, + failover_test_id=failover_test_id, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ExpressRouteFailoverSingleTestDetails]", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _start_express_route_site_failover_simulation_initial( # pylint: disable=name-too-long + self, resource_group_name: str, virtual_network_gateway_name: str, *, peering_location: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_start_express_route_site_failover_simulation_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + peering_location=peering_location, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_start_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, resource_group_name: str, virtual_network_gateway_name: str, *, peering_location: str, **kwargs: Any + ) -> AsyncLROPoller[str]: + """This operation starts failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword peering_location: Peering location of the test. Required. + :paramtype peering_location: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[str] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._start_express_route_site_failover_simulation_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peering_location=peering_location, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("str", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[str].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _stop_express_route_site_failover_simulation_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: Union[_models.ExpressRouteFailoverStopApiParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(stop_parameters, (IOBase, bytes)): + _content = stop_parameters + else: + _json = self._serialize.body(stop_parameters, "ExpressRouteFailoverStopApiParameters") + + _request = build_virtual_network_gateways_stop_express_route_site_failover_simulation_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, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: _models.ExpressRouteFailoverStopApiParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Required. + :type stop_parameters: ~azure.mgmt.network.models.ExpressRouteFailoverStopApiParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @overload + async def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Required. + :type stop_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @distributed_trace_async + async def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: Union[_models.ExpressRouteFailoverStopApiParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Is either a ExpressRouteFailoverStopApiParameters type or a + IO[bytes] type. Required. + :type stop_parameters: ~azure.mgmt.network.models.ExpressRouteFailoverStopApiParameters or + IO[bytes] + :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: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[str] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._stop_express_route_site_failover_simulation_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + stop_parameters=stop_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("str", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[str].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _get_vpnclient_connection_health_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55904,7 +59394,7 @@ async def _get_vpnclient_connection_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpnclient_connection_health_request( @@ -55960,7 +59450,7 @@ async def begin_get_vpnclient_connection_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnClientConnectionHealthDetailListResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -56012,7 +59502,7 @@ async def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint request: Union[_models.P2SVpnConnectionRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56023,7 +59513,7 @@ async def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -56147,7 +59637,7 @@ async def begin_disconnect_virtual_network_gateway_vpn_connections( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -56216,7 +59706,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualNetworkGatewayConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56227,7 +59717,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -56363,7 +59853,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -56425,7 +59915,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGatewayConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56436,7 +59926,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_request( @@ -56470,7 +59960,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56481,7 +59971,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_delete_request( @@ -56535,7 +60025,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -56581,7 +60071,7 @@ async def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56592,7 +60082,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -56727,7 +60217,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -56781,7 +60271,7 @@ async def _set_shared_key_initial( parameters: Union[_models.ConnectionSharedKey, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56792,7 +60282,7 @@ async def _set_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -56931,7 +60421,7 @@ async def begin_set_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionSharedKey] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -56994,7 +60484,7 @@ async def get_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKey :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57005,7 +60495,7 @@ async def get_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKey] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_shared_key_request( @@ -57052,10 +60542,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57112,7 +60602,7 @@ async def _reset_shared_key_initial( parameters: Union[_models.ConnectionResetSharedKey, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57123,7 +60613,7 @@ async def _reset_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -57262,7 +60752,7 @@ async def begin_reset_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionResetSharedKey] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -57315,7 +60805,7 @@ async def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57326,7 +60816,7 @@ async def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -57460,7 +60950,7 @@ async def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -57511,7 +61001,7 @@ async def _stop_packet_capture_initial( parameters: Union[_models.VpnPacketCaptureStopParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57522,7 +61012,7 @@ async def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -57653,7 +61143,7 @@ async def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -57700,7 +61190,7 @@ def get_long_running_output(pipeline_response): async def _get_ike_sas_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57711,7 +61201,7 @@ async def _get_ike_sas_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_ike_sas_request( @@ -57767,7 +61257,7 @@ async def begin_get_ike_sas( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -57811,7 +61301,7 @@ def get_long_running_output(pipeline_response): async def _reset_connection_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57822,7 +61312,7 @@ async def _reset_connection_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_reset_connection_request( @@ -57877,7 +61367,7 @@ async def begin_reset_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -57943,7 +61433,7 @@ async def _create_or_update_initial( parameters: Union[_models.LocalNetworkGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57954,7 +61444,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -58083,7 +61573,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -58144,7 +61634,7 @@ async def get( :rtype: ~azure.mgmt.network.models.LocalNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58155,7 +61645,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) _request = build_local_network_gateways_get_request( @@ -58189,7 +61679,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, local_network_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58200,7 +61690,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_local_network_gateways_delete_request( @@ -58253,7 +61743,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -58365,7 +61855,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.LocalNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58376,7 +61866,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) @@ -58432,10 +61922,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.LocalNetworkGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58521,7 +62011,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGatewayNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58532,7 +62022,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayNatRule] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_nat_rules_get_request( @@ -58572,7 +62062,7 @@ async def _create_or_update_initial( nat_rule_parameters: Union[_models.VirtualNetworkGatewayNatRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58583,7 +62073,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -58726,7 +62216,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayNatRule] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -58777,7 +62267,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_network_gateway_name: str, nat_rule_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58788,7 +62278,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_nat_rules_delete_request( @@ -58844,7 +62334,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -58903,10 +62393,10 @@ def list_by_virtual_network_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualNetworkGatewayNatRulesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58978,7 +62468,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58989,7 +62479,7 @@ async def _delete_initial(self, resource_group_name: str, tap_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_taps_delete_request( @@ -59040,7 +62530,7 @@ async def begin_delete(self, resource_group_name: str, tap_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -59091,7 +62581,7 @@ async def get(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.network.models.VirtualNetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59102,7 +62592,7 @@ async def get(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) _request = build_virtual_network_taps_get_request( @@ -59140,7 +62630,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualNetworkTap, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59151,7 +62641,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -59280,7 +62770,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -59400,7 +62890,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VirtualNetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59411,7 +62901,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) @@ -59465,10 +62955,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualNetworkTap"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTapListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59532,10 +63022,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTapListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59608,7 +63098,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, virtual_router_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59619,7 +63109,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_routers_delete_request( @@ -59673,7 +63163,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -59728,7 +63218,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualRouter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59739,7 +63229,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouter] = kwargs.pop("cls", None) _request = build_virtual_routers_get_request( @@ -59779,7 +63269,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualRouter, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59790,7 +63280,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -59918,7 +63408,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualRouter] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -59978,10 +63468,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60043,10 +63533,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VirtualRouter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60119,7 +63609,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, resource_group_name: str, virtual_router_name: str, peering_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60130,7 +63620,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_router_peerings_delete_request( @@ -60187,7 +63677,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -60243,7 +63733,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualRouterPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60254,7 +63744,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterPeering] = kwargs.pop("cls", None) _request = build_virtual_router_peerings_get_request( @@ -60295,7 +63785,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualRouterPeering, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60306,7 +63796,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -60446,7 +63936,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualRouterPeering] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -60513,10 +64003,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60600,7 +64090,7 @@ async def get(self, resource_group_name: str, virtual_wan_name: str, **kwargs: A :rtype: ~azure.mgmt.network.models.VirtualWAN :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60611,7 +64101,7 @@ async def get(self, resource_group_name: str, virtual_wan_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) _request = build_virtual_wans_get_request( @@ -60649,7 +64139,7 @@ async def _create_or_update_initial( wan_parameters: Union[_models.VirtualWAN, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60660,7 +64150,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -60787,7 +64277,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -60907,7 +64397,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VirtualWAN :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60918,7 +64408,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) @@ -60964,7 +64454,7 @@ async def update_tags( async def _delete_initial( self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60975,7 +64465,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_wans_delete_request( @@ -61028,7 +64518,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -61080,10 +64570,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualWANsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61144,10 +64634,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VirtualWAN"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualWANsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61228,7 +64718,7 @@ async def get(self, resource_group_name: str, vpn_site_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.VpnSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61239,7 +64729,7 @@ async def get(self, resource_group_name: str, vpn_site_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) _request = build_vpn_sites_get_request( @@ -61277,7 +64767,7 @@ async def _create_or_update_initial( vpn_site_parameters: Union[_models.VpnSite, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61288,7 +64778,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -61415,7 +64905,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -61535,7 +65025,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VpnSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61546,7 +65036,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) @@ -61592,7 +65082,7 @@ async def update_tags( async def _delete_initial( self, resource_group_name: str, vpn_site_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61603,7 +65093,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_sites_delete_request( @@ -61654,7 +65144,7 @@ async def begin_delete(self, resource_group_name: str, vpn_site_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -61706,10 +65196,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSitesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61770,10 +65260,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VpnSite"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSitesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61858,7 +65348,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnSiteLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61869,7 +65359,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSiteLink] = kwargs.pop("cls", None) _request = build_vpn_site_links_get_request( @@ -61918,10 +65408,10 @@ def list_by_vpn_site( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSiteLinksResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61999,7 +65489,7 @@ async def _download_initial( request: Union[_models.GetVpnSitesConfigurationRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62010,7 +65500,7 @@ async def _download_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -62137,7 +65627,7 @@ async def begin_download( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -62214,7 +65704,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnServerConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62225,7 +65715,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_get_request( @@ -62263,7 +65753,7 @@ async def _create_or_update_initial( vpn_server_configuration_parameters: Union[_models.VpnServerConfiguration, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62274,7 +65764,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -62410,7 +65900,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -62535,7 +66025,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VpnServerConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62546,7 +66036,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) @@ -62592,7 +66082,7 @@ async def update_tags( async def _delete_initial( self, resource_group_name: str, vpn_server_configuration_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62603,7 +66093,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_delete_request( @@ -62657,7 +66147,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -62713,10 +66203,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62779,10 +66269,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VpnServerConfiguration"] _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62859,7 +66349,7 @@ async def _create_or_update_initial( vpn_server_configuration_policy_group_parameters: Union[_models.VpnServerConfigurationPolicyGroup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62870,7 +66360,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -63017,7 +66507,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfigurationPolicyGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -63072,7 +66562,7 @@ async def _delete_initial( configuration_policy_group_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63083,7 +66573,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_configuration_policy_groups_delete_request( @@ -63143,7 +66633,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63204,7 +66694,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnServerConfigurationPolicyGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63215,7 +66705,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfigurationPolicyGroup] = kwargs.pop("cls", None) _request = build_configuration_policy_groups_get_request( @@ -63266,10 +66756,10 @@ def list_by_vpn_server_configuration( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationPolicyGroupsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63352,7 +66842,7 @@ async def get(self, resource_group_name: str, virtual_hub_name: str, **kwargs: A :rtype: ~azure.mgmt.network.models.VirtualHub :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63363,7 +66853,7 @@ async def get(self, resource_group_name: str, virtual_hub_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) _request = build_virtual_hubs_get_request( @@ -63401,7 +66891,7 @@ async def _create_or_update_initial( virtual_hub_parameters: Union[_models.VirtualHub, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63412,7 +66902,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -63539,7 +67029,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -63659,7 +67149,7 @@ async def update_tags( :rtype: ~azure.mgmt.network.models.VirtualHub :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63670,7 +67160,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) @@ -63716,7 +67206,7 @@ async def update_tags( async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63727,7 +67217,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hubs_delete_request( @@ -63780,7 +67270,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63832,10 +67322,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63896,10 +67386,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VirtualHub"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63955,7 +67445,7 @@ async def _get_effective_virtual_hub_routes_initial( # pylint: disable=name-too effective_routes_parameters: Optional[Union[_models.EffectiveRoutesParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63966,7 +67456,7 @@ async def _get_effective_virtual_hub_routes_initial( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -64103,7 +67593,7 @@ async def begin_get_effective_virtual_hub_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHubEffectiveRouteList] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -64156,7 +67646,7 @@ async def _get_inbound_routes_initial( get_inbound_routes_parameters: Union[_models.GetInboundRoutesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64167,7 +67657,7 @@ async def _get_inbound_routes_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -64300,7 +67790,7 @@ async def begin_get_inbound_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EffectiveRouteMapRouteList] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -64353,7 +67843,7 @@ async def _get_outbound_routes_initial( get_outbound_routes_parameters: Union[_models.GetOutboundRoutesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64364,7 +67854,7 @@ async def _get_outbound_routes_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -64498,7 +67988,7 @@ async def begin_get_outbound_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EffectiveRouteMapRouteList] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -64580,7 +68070,7 @@ async def get( :rtype: ~azure.mgmt.network.models.RouteMap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64591,7 +68081,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteMap] = kwargs.pop("cls", None) _request = build_route_maps_get_request( @@ -64631,7 +68121,7 @@ async def _create_or_update_initial( route_map_parameters: Union[_models.RouteMap, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64642,7 +68132,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -64779,7 +68269,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteMap] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -64830,7 +68320,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_map_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64841,7 +68331,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_route_maps_delete_request( @@ -64897,7 +68387,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -64953,10 +68443,10 @@ def list(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListRouteMapsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65035,7 +68525,7 @@ async def _create_or_update_initial( hub_virtual_network_connection_parameters: Union[_models.HubVirtualNetworkConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65046,7 +68536,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -65194,7 +68684,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubVirtualNetworkConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -65245,7 +68735,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65256,7 +68746,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_hub_virtual_network_connections_delete_request( @@ -65312,7 +68802,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -65368,7 +68858,7 @@ async def get( :rtype: ~azure.mgmt.network.models.HubVirtualNetworkConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65379,7 +68869,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubVirtualNetworkConnection] = kwargs.pop("cls", None) _request = build_hub_virtual_network_connections_get_request( @@ -65430,10 +68920,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListHubVirtualNetworkConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65516,7 +69006,7 @@ async def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.VpnGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65527,7 +69017,7 @@ async def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) _request = build_vpn_gateways_get_request( @@ -65565,7 +69055,7 @@ async def _create_or_update_initial( vpn_gateway_parameters: Union[_models.VpnGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65576,7 +69066,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -65705,7 +69195,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -65759,7 +69249,7 @@ async def _update_tags_initial( vpn_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65770,7 +69260,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -65899,7 +69389,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -65947,7 +69437,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65958,7 +69448,7 @@ async def _delete_initial(self, resource_group_name: str, gateway_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_gateways_delete_request( @@ -66009,7 +69499,7 @@ async def begin_delete(self, resource_group_name: str, gateway_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -66051,7 +69541,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reset_initial( self, resource_group_name: str, gateway_name: str, *, ip_configuration_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66062,7 +69552,7 @@ async def _reset_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_gateways_reset_request( @@ -66120,7 +69610,7 @@ async def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -66171,7 +69661,7 @@ async def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnGatewayPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66182,7 +69672,7 @@ async def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -66313,7 +69803,7 @@ async def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -66364,7 +69854,7 @@ async def _stop_packet_capture_initial( parameters: Optional[Union[_models.VpnGatewayPacketCaptureStopParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66375,7 +69865,7 @@ async def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -66505,7 +69995,7 @@ async def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -66562,10 +70052,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66626,10 +70116,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VpnGateway"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66706,7 +70196,7 @@ async def _reset_connection_initial( link_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66717,7 +70207,7 @@ async def _reset_connection_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_link_connections_reset_connection_request( @@ -66782,7 +70272,7 @@ async def begin_reset_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -66851,10 +70341,10 @@ def get_all_shared_keys( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResultList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66930,7 +70420,7 @@ async def get_default_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKeyResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66941,7 +70431,7 @@ async def get_default_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) _request = build_vpn_link_connections_get_default_shared_key_request( @@ -66983,7 +70473,7 @@ async def _set_or_init_default_shared_key_initial( connection_shared_key_parameters: Union[_models.ConnectionSharedKeyResult, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66994,7 +70484,7 @@ async def _set_or_init_default_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -67154,7 +70644,7 @@ async def begin_set_or_init_default_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -67226,7 +70716,7 @@ async def list_default_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKeyResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67237,7 +70727,7 @@ async def list_default_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) _request = build_vpn_link_connections_list_default_shared_key_request( @@ -67278,7 +70768,7 @@ async def _get_ike_sas_initial( link_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67289,7 +70779,7 @@ async def _get_ike_sas_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_link_connections_get_ike_sas_request( @@ -67354,7 +70844,7 @@ async def begin_get_ike_sas( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -67419,10 +70909,10 @@ def list_by_vpn_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSiteLinkConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67510,7 +71000,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67521,7 +71011,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnConnection] = kwargs.pop("cls", None) _request = build_vpn_connections_get_request( @@ -67561,7 +71051,7 @@ async def _create_or_update_initial( vpn_connection_parameters: Union[_models.VpnConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67572,7 +71062,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -67714,7 +71204,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -67765,7 +71255,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, gateway_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67776,7 +71266,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_connections_delete_request( @@ -67832,7 +71322,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -67880,7 +71370,7 @@ async def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnConnectionPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67891,7 +71381,7 @@ async def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -68032,7 +71522,7 @@ async def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -68085,7 +71575,7 @@ async def _stop_packet_capture_initial( parameters: Optional[Union[_models.VpnConnectionPacketCaptureStopParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68096,7 +71586,7 @@ async def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -68237,7 +71727,7 @@ async def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -68299,10 +71789,10 @@ def list_by_vpn_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68396,7 +71886,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnSiteLinkConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68407,7 +71897,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSiteLinkConnection] = kwargs.pop("cls", None) _request = build_vpn_site_link_connections_get_request( @@ -68476,7 +71966,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VpnGatewayNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68487,7 +71977,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGatewayNatRule] = kwargs.pop("cls", None) _request = build_nat_rules_get_request( @@ -68527,7 +72017,7 @@ async def _create_or_update_initial( nat_rule_parameters: Union[_models.VpnGatewayNatRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68538,7 +72028,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -68678,7 +72168,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGatewayNatRule] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -68729,7 +72219,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, gateway_name: str, nat_rule_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68740,7 +72230,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_nat_rules_delete_request( @@ -68796,7 +72286,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -68853,10 +72343,10 @@ def list_by_vpn_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewayNatRulesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68939,7 +72429,7 @@ async def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.P2SVpnGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68950,7 +72440,7 @@ async def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_get_request( @@ -68988,7 +72478,7 @@ async def _create_or_update_initial( p2_s_vpn_gateway_parameters: Union[_models.P2SVpnGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68999,7 +72489,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -69128,7 +72618,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -69182,7 +72672,7 @@ async def _update_tags_initial( p2_s_vpn_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69193,7 +72683,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -69322,7 +72812,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -69370,7 +72860,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69381,7 +72871,7 @@ async def _delete_initial(self, resource_group_name: str, gateway_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_delete_request( @@ -69432,7 +72922,7 @@ async def begin_delete(self, resource_group_name: str, gateway_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -69484,10 +72974,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListP2SVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69548,10 +73038,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.P2SVpnGateway"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListP2SVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69601,7 +73091,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _reset_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69612,7 +73102,7 @@ async def _reset_initial(self, resource_group_name: str, gateway_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_reset_request( @@ -69666,7 +73156,7 @@ async def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -69716,7 +73206,7 @@ async def _generate_vpn_profile_initial( parameters: Union[_models.P2SVpnProfileParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69727,7 +73217,7 @@ async def _generate_vpn_profile_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -69856,7 +73346,7 @@ async def begin_generate_vpn_profile( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnProfileResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -69905,7 +73395,7 @@ def get_long_running_output(pipeline_response): async def _get_p2_s_vpn_connection_health_initial( self, resource_group_name: str, gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69916,7 +73406,7 @@ async def _get_p2_s_vpn_connection_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request( @@ -69971,7 +73461,7 @@ async def begin_get_p2_s_vpn_connection_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -70021,7 +73511,7 @@ async def _get_p2_s_vpn_connection_health_detailed_initial( # pylint: disable=n request: Union[_models.P2SVpnConnectionHealthRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70032,7 +73522,7 @@ async def _get_p2_s_vpn_connection_health_detailed_initial( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -70164,7 +73654,7 @@ async def begin_get_p2_s_vpn_connection_health_detailed( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnConnectionHealth] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -70217,7 +73707,7 @@ async def _disconnect_p2_s_vpn_connections_initial( request: Union[_models.P2SVpnConnectionRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70228,7 +73718,7 @@ async def _disconnect_p2_s_vpn_connections_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -70355,7 +73845,7 @@ async def begin_disconnect_p2_s_vpn_connections( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -70420,7 +73910,7 @@ def __init__(self, *args, **kwargs) -> None: async def _list_initial( self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70431,7 +73921,7 @@ async def _list_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_associated_with_virtual_wan_list_request( @@ -70487,7 +73977,7 @@ async def begin_list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfigurationsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -70566,7 +74056,7 @@ async def get( :rtype: ~azure.mgmt.network.models.VirtualHubRouteTableV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70577,7 +74067,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualHubRouteTableV2] = kwargs.pop("cls", None) _request = build_virtual_hub_route_table_v2_s_get_request( @@ -70618,7 +74108,7 @@ async def _create_or_update_initial( virtual_hub_route_table_v2_parameters: Union[_models.VirtualHubRouteTableV2, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70629,7 +74119,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -70773,7 +74263,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHubRouteTableV2] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -70824,7 +74314,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_table_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70835,7 +74325,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_route_table_v2_s_delete_request( @@ -70892,7 +74382,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -70951,10 +74441,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubRouteTableV2SResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71033,7 +74523,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.ExpressRouteGatew :rtype: ~azure.mgmt.network.models.ExpressRouteGatewayList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71044,7 +74534,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.ExpressRouteGatew _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGatewayList] = kwargs.pop("cls", None) _request = build_express_route_gateways_list_by_subscription_request( @@ -71083,7 +74573,7 @@ async def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.ExpressRouteGatewayList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71094,7 +74584,7 @@ async def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGatewayList] = kwargs.pop("cls", None) _request = build_express_route_gateways_list_by_resource_group_request( @@ -71131,7 +74621,7 @@ async def _create_or_update_initial( put_express_route_gateway_parameters: Union[_models.ExpressRouteGateway, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71142,7 +74632,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -71272,7 +74762,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -71326,7 +74816,7 @@ async def _update_tags_initial( express_route_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71337,7 +74827,7 @@ async def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -71466,7 +74956,7 @@ async def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -71527,7 +75017,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71538,7 +75028,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) _request = build_express_route_gateways_get_request( @@ -71572,7 +75062,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, express_route_gateway_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71583,7 +75073,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_gateways_delete_request( @@ -71637,7 +75127,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -71704,7 +75194,7 @@ async def _create_or_update_initial( put_express_route_connection_parameters: Union[_models.ExpressRouteConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71715,7 +75205,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -71857,7 +75347,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -71921,7 +75411,7 @@ async def get( :rtype: ~azure.mgmt.network.models.ExpressRouteConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71932,7 +75422,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteConnection] = kwargs.pop("cls", None) _request = build_express_route_connections_get_request( @@ -71967,7 +75457,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, express_route_gateway_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71978,7 +75468,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_connections_delete_request( @@ -72034,7 +75524,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -72088,7 +75578,7 @@ async def list( :rtype: ~azure.mgmt.network.models.ExpressRouteConnectionList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72099,7 +75589,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteConnectionList] = kwargs.pop("cls", None) _request = build_express_route_connections_list_request( @@ -72158,7 +75648,7 @@ async def _create_or_update_initial( network_virtual_appliance_connection_parameters: Union[_models.NetworkVirtualApplianceConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72169,7 +75659,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -72319,7 +75809,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualApplianceConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -72383,7 +75873,7 @@ async def get( :rtype: ~azure.mgmt.network.models.NetworkVirtualApplianceConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72394,7 +75884,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceConnection] = kwargs.pop("cls", None) _request = build_network_virtual_appliance_connections_get_request( @@ -72429,7 +75919,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72440,7 +75930,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_network_virtual_appliance_connections_delete_request( @@ -72500,7 +75990,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -72559,10 +76049,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceConnectionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72649,7 +76139,7 @@ async def get( :rtype: ~azure.mgmt.network.models.BgpConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72660,7 +76150,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpConnection] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connection_get_request( @@ -72700,7 +76190,7 @@ async def _create_or_update_initial( parameters: Union[_models.BgpConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72711,7 +76201,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -72851,7 +76341,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BgpConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -72902,7 +76392,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72913,7 +76403,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connection_delete_request( @@ -72969,7 +76459,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -73046,10 +76536,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubBgpConnectionResults] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73103,7 +76593,7 @@ async def get_next(next_link=None): async def _list_learned_routes_initial( self, resource_group_name: str, hub_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73114,7 +76604,7 @@ async def _list_learned_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connections_list_learned_routes_request( @@ -73172,7 +76662,7 @@ async def begin_list_learned_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Dict[str, List[_models.PeerRoute]]] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -73219,7 +76709,7 @@ def get_long_running_output(pipeline_response): async def _list_advertised_routes_initial( self, resource_group_name: str, hub_name: str, connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73230,7 +76720,7 @@ async def _list_advertised_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connections_list_advertised_routes_request( @@ -73288,7 +76778,7 @@ async def begin_list_advertised_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Dict[str, List[_models.PeerRoute]]] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -73368,7 +76858,7 @@ async def get( :rtype: ~azure.mgmt.network.models.HubIpConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73379,7 +76869,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubIpConfiguration] = kwargs.pop("cls", None) _request = build_virtual_hub_ip_configuration_get_request( @@ -73419,7 +76909,7 @@ async def _create_or_update_initial( parameters: Union[_models.HubIpConfiguration, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73430,7 +76920,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -73570,7 +77060,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubIpConfiguration] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -73621,7 +77111,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, ip_config_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73632,7 +77122,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_ip_configuration_delete_request( @@ -73688,7 +77178,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -73745,10 +77235,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubIpConfigurationResults] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73827,7 +77317,7 @@ async def _create_or_update_initial( route_table_parameters: Union[_models.HubRouteTable, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73838,7 +77328,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -73975,7 +77465,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubRouteTable] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -74039,7 +77529,7 @@ async def get( :rtype: ~azure.mgmt.network.models.HubRouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74050,7 +77540,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubRouteTable] = kwargs.pop("cls", None) _request = build_hub_route_tables_get_request( @@ -74085,7 +77575,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_table_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74096,7 +77586,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_hub_route_tables_delete_request( @@ -74152,7 +77642,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -74209,10 +77699,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListHubRouteTablesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74291,7 +77781,7 @@ async def _create_or_update_initial( routing_intent_parameters: Union[_models.RoutingIntent, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74302,7 +77792,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -74444,7 +77934,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RoutingIntent] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -74508,7 +77998,7 @@ async def get( :rtype: ~azure.mgmt.network.models.RoutingIntent :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74519,7 +78009,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RoutingIntent] = kwargs.pop("cls", None) _request = build_routing_intent_get_request( @@ -74554,7 +78044,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, routing_intent_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74565,7 +78055,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_routing_intent_delete_request( @@ -74621,7 +78111,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -74678,10 +78168,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListRoutingIntentResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74767,10 +78257,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74833,10 +78323,10 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.WebApplicationFirewa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74899,7 +78389,7 @@ async def get( :rtype: ~azure.mgmt.network.models.WebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74910,7 +78400,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicy] = kwargs.pop("cls", None) _request = build_web_application_firewall_policies_get_request( @@ -75014,7 +78504,7 @@ async def create_or_update( :rtype: ~azure.mgmt.network.models.WebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75025,7 +78515,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WebApplicationFirewallPolicy] = kwargs.pop("cls", None) @@ -75069,7 +78559,7 @@ async def create_or_update( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75080,7 +78570,7 @@ async def _delete_initial(self, resource_group_name: str, policy_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_web_application_firewall_policies_delete_request( @@ -75131,7 +78621,7 @@ async def begin_delete(self, resource_group_name: str, policy_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/__init__.py index 6773fbd575b0..4b31ddb18fb8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,976 +6,1033 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AadAuthenticationParameters -from ._models_py3 import Action -from ._models_py3 import ActiveBaseSecurityAdminRule -from ._models_py3 import ActiveConfigurationParameter -from ._models_py3 import ActiveConnectivityConfiguration -from ._models_py3 import ActiveConnectivityConfigurationsListResult -from ._models_py3 import ActiveDefaultSecurityAdminRule -from ._models_py3 import ActiveSecurityAdminRule -from ._models_py3 import ActiveSecurityAdminRulesListResult -from ._models_py3 import AddressPrefixItem -from ._models_py3 import AddressSpace -from ._models_py3 import AdminRule -from ._models_py3 import AdminRuleCollection -from ._models_py3 import AdminRuleCollectionListResult -from ._models_py3 import AdminRuleListResult -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 ApplicationGatewayFirewallManifestRuleSet -from ._models_py3 import ApplicationGatewayFirewallRule -from ._models_py3 import ApplicationGatewayFirewallRuleGroup -from ._models_py3 import ApplicationGatewayFirewallRuleSet -from ._models_py3 import ApplicationGatewayForContainersReferenceDefinition -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 ApplicationGatewayWafDynamicManifestResult -from ._models_py3 import ApplicationGatewayWafDynamicManifestResultList -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 AzureFirewallAutoscaleConfiguration -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 AzureFirewallPacketCaptureFlags -from ._models_py3 import AzureFirewallPacketCaptureRule -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 BaseAdminRule -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 BastionHostPropertiesFormatNetworkAcls -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 BastionShareableLinkTokenListRequest -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 ChildResource -from ._models_py3 import CloudErrorBody -from ._models_py3 import ( +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AadAuthenticationParameters, + Action, + ActiveBaseSecurityAdminRule, + ActiveConfigurationParameter, + ActiveConnectivityConfiguration, + ActiveConnectivityConfigurationsListResult, + ActiveDefaultSecurityAdminRule, + ActiveSecurityAdminRule, + ActiveSecurityAdminRulesListResult, + AddressPrefixItem, + AddressSpace, + AdminRule, + AdminRuleCollection, + AdminRuleCollectionListResult, + AdminRuleListResult, + ApplicationGateway, + ApplicationGatewayAuthenticationCertificate, + ApplicationGatewayAutoscaleConfiguration, + ApplicationGatewayAvailableSslOptions, + ApplicationGatewayAvailableSslPredefinedPolicies, + ApplicationGatewayAvailableWafRuleSetsResult, + ApplicationGatewayBackendAddress, + ApplicationGatewayBackendAddressPool, + ApplicationGatewayBackendHealth, + ApplicationGatewayBackendHealthHttpSettings, + ApplicationGatewayBackendHealthOnDemand, + ApplicationGatewayBackendHealthPool, + ApplicationGatewayBackendHealthServer, + ApplicationGatewayBackendHttpSettings, + ApplicationGatewayBackendSettings, + ApplicationGatewayClientAuthConfiguration, + ApplicationGatewayConnectionDraining, + ApplicationGatewayCustomError, + ApplicationGatewayFirewallDisabledRuleGroup, + ApplicationGatewayFirewallExclusion, + ApplicationGatewayFirewallManifestRuleSet, + ApplicationGatewayFirewallRule, + ApplicationGatewayFirewallRuleGroup, + ApplicationGatewayFirewallRuleSet, + ApplicationGatewayForContainersReferenceDefinition, + 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, + ApplicationGatewayWafDynamicManifestResult, + ApplicationGatewayWafDynamicManifestResultList, + ApplicationGatewayWebApplicationFirewallConfiguration, + ApplicationRule, + ApplicationSecurityGroup, + ApplicationSecurityGroupListResult, + AuthorizationListResult, + AutoApprovedPrivateLinkService, + AutoApprovedPrivateLinkServicesResult, + Availability, + AvailableDelegation, + AvailableDelegationsResult, + AvailablePrivateEndpointType, + AvailablePrivateEndpointTypesResult, + AvailableProvidersList, + AvailableProvidersListCity, + AvailableProvidersListCountry, + AvailableProvidersListParameters, + AvailableProvidersListState, + AvailableServiceAlias, + AvailableServiceAliasesResult, + AzureAsyncOperationResult, + AzureFirewall, + AzureFirewallApplicationRule, + AzureFirewallApplicationRuleCollection, + AzureFirewallApplicationRuleProtocol, + AzureFirewallAutoscaleConfiguration, + AzureFirewallFqdnTag, + AzureFirewallFqdnTagListResult, + AzureFirewallIPConfiguration, + AzureFirewallIpGroups, + AzureFirewallListResult, + AzureFirewallNatRCAction, + AzureFirewallNatRule, + AzureFirewallNatRuleCollection, + AzureFirewallNetworkRule, + AzureFirewallNetworkRuleCollection, + AzureFirewallPacketCaptureFlags, + AzureFirewallPacketCaptureRule, + AzureFirewallPublicIPAddress, + AzureFirewallRCAction, + AzureFirewallSku, + AzureReachabilityReport, + AzureReachabilityReportItem, + AzureReachabilityReportLatencyInfo, + AzureReachabilityReportLocation, + AzureReachabilityReportParameters, + AzureWebCategory, + AzureWebCategoryListResult, + BGPCommunity, + BackendAddressInboundNatRulePortMappings, + BackendAddressPool, + BaseAdminRule, + BastionActiveSession, + BastionActiveSessionListResult, + BastionHost, + BastionHostIPConfiguration, + BastionHostListResult, + BastionHostPropertiesFormatNetworkAcls, + BastionSessionDeleteResult, + BastionSessionState, + BastionShareableLink, + BastionShareableLinkListRequest, + BastionShareableLinkListResult, + BastionShareableLinkTokenListRequest, + BgpConnection, + BgpPeerStatus, + BgpPeerStatusListResult, + BgpServiceCommunity, + BgpServiceCommunityListResult, + BgpSettings, + BreakOutCategoryPolicies, + CheckPrivateLinkServiceVisibilityRequest, + ChildResource, + CloudErrorBody, + CommonErrorAdditionalInfo, + CommonErrorDetail, + CommonErrorResponse, + CommonProxyResource, + CommonResource, + CommonTrackedResource, Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, + ConfigurationGroup, + ConnectionMonitor, + ConnectionMonitorDestination, + ConnectionMonitorEndpoint, + ConnectionMonitorEndpointFilter, + ConnectionMonitorEndpointFilterItem, + ConnectionMonitorEndpointLocationDetails, + ConnectionMonitorEndpointScope, + ConnectionMonitorEndpointScopeItem, + ConnectionMonitorHttpConfiguration, + ConnectionMonitorIcmpConfiguration, + ConnectionMonitorListResult, + ConnectionMonitorOutput, + ConnectionMonitorParameters, + ConnectionMonitorQueryResult, + ConnectionMonitorResult, + ConnectionMonitorResultProperties, + ConnectionMonitorSource, + ConnectionMonitorSuccessThreshold, + ConnectionMonitorTcpConfiguration, + ConnectionMonitorTestConfiguration, + ConnectionMonitorTestGroup, + ConnectionMonitorWorkspaceSettings, + ConnectionResetSharedKey, + ConnectionSharedKey, + ConnectionSharedKeyResult, + ConnectionSharedKeyResultList, + ConnectionStateSnapshot, + ConnectivityConfiguration, + ConnectivityConfigurationListResult, + ConnectivityDestination, + ConnectivityGroupItem, + ConnectivityHop, + ConnectivityInformation, + ConnectivityIssue, + ConnectivityParameters, + ConnectivitySource, + Container, + ContainerNetworkInterface, + ContainerNetworkInterfaceConfiguration, + ContainerNetworkInterfaceIpConfiguration, + Criterion, + CrossTenantScopes, + CustomDnsConfigPropertiesFormat, + CustomIpPrefix, + CustomIpPrefixListResult, + DdosCustomPolicy, + DdosProtectionPlan, + DdosProtectionPlanListResult, + DdosSettings, + DefaultAdminRule, + Delegation, + DelegationProperties, + DeviceProperties, + DhcpOptions, + Dimension, + DnsNameAvailabilityResult, + DnsSettings, + DscpConfiguration, + DscpConfigurationListResult, + EffectiveBaseSecurityAdminRule, + EffectiveConnectivityConfiguration, + EffectiveDefaultSecurityAdminRule, + EffectiveNetworkSecurityGroup, + EffectiveNetworkSecurityGroupAssociation, + EffectiveNetworkSecurityGroupListResult, + EffectiveNetworkSecurityRule, + EffectiveRoute, + EffectiveRouteListResult, + EffectiveRouteMapRoute, + EffectiveRouteMapRouteList, + EffectiveRoutesParameters, + EffectiveSecurityAdminRule, + EndpointServiceResult, + EndpointServicesListResult, + Error, + ErrorDetails, + ErrorResponse, + EvaluatedNetworkSecurityGroup, + ExceptionEntry, + ExclusionManagedRule, + ExclusionManagedRuleGroup, + ExclusionManagedRuleSet, + ExplicitProxy, + 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, + ExpressRouteFailoverCircuitResourceDetails, + ExpressRouteFailoverConnectionResourceDetails, + ExpressRouteFailoverRedundantRoute, + ExpressRouteFailoverSingleTestDetails, + ExpressRouteFailoverStopApiParameters, + ExpressRouteFailoverTestDetails, + ExpressRouteGateway, + ExpressRouteGatewayList, + ExpressRouteGatewayPropertiesAutoScaleConfiguration, + ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, + ExpressRouteLink, + ExpressRouteLinkListResult, + ExpressRouteLinkMacSecConfig, + ExpressRoutePort, + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationListResult, + ExpressRoutePortListResult, + ExpressRoutePortsLocation, + ExpressRoutePortsLocationBandwidths, + ExpressRoutePortsLocationListResult, + ExpressRouteProviderPort, + ExpressRouteProviderPortListResult, + ExpressRouteServiceProvider, + ExpressRouteServiceProviderBandwidthsOffered, + ExpressRouteServiceProviderListResult, + ExtendedLocation, + FailoverConnectionDetails, + FilterItems, + FirewallPacketCaptureParameters, + FirewallPolicy, + FirewallPolicyCertificateAuthority, + FirewallPolicyDraft, + FirewallPolicyFilterRuleCollection, + FirewallPolicyFilterRuleCollectionAction, + FirewallPolicyHttpHeaderToInsert, + FirewallPolicyInsights, + FirewallPolicyIntrusionDetection, + FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, + FirewallPolicyIntrusionDetectionConfiguration, + FirewallPolicyIntrusionDetectionSignatureSpecification, + FirewallPolicyListResult, + FirewallPolicyLogAnalyticsResources, + FirewallPolicyLogAnalyticsWorkspace, + FirewallPolicyNatRuleCollection, + FirewallPolicyNatRuleCollectionAction, + FirewallPolicyRule, + FirewallPolicyRuleApplicationProtocol, + FirewallPolicyRuleCollection, + FirewallPolicyRuleCollectionGroup, + FirewallPolicyRuleCollectionGroupDraft, + FirewallPolicyRuleCollectionGroupListResult, + FirewallPolicySNAT, + FirewallPolicySQL, + FirewallPolicySku, + FirewallPolicyThreatIntelWhitelist, + FirewallPolicyTransportSecurity, + FlowLog, + FlowLogFormatParameters, + FlowLogInformation, + FlowLogListResult, + FlowLogStatusParameters, + FrontendIPConfiguration, + GatewayCustomBgpIpAddressIpConfiguration, + GatewayLoadBalancerTunnelInterface, + GatewayRoute, + GatewayRouteListResult, + GenerateExpressRoutePortsLOARequest, + GenerateExpressRoutePortsLOAResult, + GetInboundRoutesParameters, + GetOutboundRoutesParameters, + GetVpnSitesConfigurationRequest, + GroupByUserSession, + GroupByVariable, + HTTPConfiguration, + HTTPHeader, + HeaderValueMatcher, + HopLink, + Hub, + HubIPAddresses, + HubIpConfiguration, + HubPublicIPAddresses, + HubRoute, + HubRouteTable, + HubVirtualNetworkConnection, + IDPSQueryObject, + IPAddressAvailabilityResult, + IPConfiguration, + IPConfigurationBgpPeeringAddress, + IPConfigurationProfile, + IPPrefixesList, + IPRule, + IPTraffic, + InboundNatPool, + InboundNatRule, + InboundNatRuleListResult, + InboundNatRulePortMapping, + InboundSecurityRule, + InboundSecurityRules, + IntentContent, + InternetIngressPublicIpsProperties, + IpAllocation, + IpAllocationListResult, + IpGroup, + IpGroupListResult, + IpTag, + IpamPool, + IpamPoolList, + IpamPoolPrefixAllocation, + IpamPoolProperties, + IpamPoolUpdate, + IpamPoolUpdateProperties, + IpsecPolicy, + Ipv6CircuitConnectionConfig, + Ipv6ExpressRouteCircuitPeeringConfig, + ListHubRouteTablesResult, + ListHubVirtualNetworkConnectionsResult, + ListP2SVpnGatewaysResult, + ListRouteMapsResult, + ListRoutingIntentResult, + ListVirtualHubBgpConnectionResults, + ListVirtualHubIpConfigurationResults, + ListVirtualHubRouteTableV2SResult, + ListVirtualHubsResult, + ListVirtualNetworkGatewayNatRulesResult, + ListVirtualWANsResult, + ListVpnConnectionsResult, + ListVpnGatewayNatRulesResult, + ListVpnGatewaysResult, + ListVpnServerConfigurationPolicyGroupsResult, + ListVpnServerConfigurationsResult, + ListVpnSiteLinkConnectionsResult, + ListVpnSiteLinksResult, + ListVpnSitesResult, + LoadBalancer, + LoadBalancerBackendAddress, + LoadBalancerBackendAddressPoolListResult, + LoadBalancerFrontendIPConfigurationListResult, + LoadBalancerHealthPerRule, + LoadBalancerHealthPerRulePerBackendAddress, + LoadBalancerListResult, + LoadBalancerLoadBalancingRuleListResult, + LoadBalancerOutboundRuleListResult, + LoadBalancerProbeListResult, + LoadBalancerSku, + LoadBalancerVipSwapRequest, + LoadBalancerVipSwapRequestFrontendIPConfiguration, + LoadBalancingRule, + LocalNetworkGateway, + LocalNetworkGatewayListResult, + LogSpecification, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRulesDefinition, + ManagedServiceIdentity, + MatchCondition, + MatchVariable, + MatchedRule, + MetricSpecification, + MigrateLoadBalancerToIpBasedRequest, + MigratedPools, + NatGateway, + NatGatewayListResult, + NatGatewaySku, + NatRule, + NatRulePortMapping, + NetworkConfigurationDiagnosticParameters, + NetworkConfigurationDiagnosticProfile, + NetworkConfigurationDiagnosticResponse, + NetworkConfigurationDiagnosticResult, + NetworkGroup, + NetworkGroupListResult, + NetworkIntentPolicy, + NetworkIntentPolicyConfiguration, + NetworkInterface, + NetworkInterfaceAssociation, + NetworkInterfaceDnsSettings, + NetworkInterfaceIPConfiguration, + NetworkInterfaceIPConfigurationListResult, + NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, + NetworkInterfaceListResult, + NetworkInterfaceLoadBalancerListResult, + NetworkInterfaceTapConfiguration, + NetworkInterfaceTapConfigurationListResult, + NetworkManager, + NetworkManagerCommit, + NetworkManagerConnection, + NetworkManagerConnectionListResult, + NetworkManagerDeploymentStatus, + NetworkManagerDeploymentStatusListResult, + NetworkManagerDeploymentStatusParameter, + NetworkManagerEffectiveConnectivityConfigurationListResult, + NetworkManagerEffectiveSecurityAdminRulesListResult, + NetworkManagerListResult, + NetworkManagerPropertiesNetworkManagerScopes, + NetworkManagerRoutingConfiguration, + NetworkManagerRoutingConfigurationListResult, + NetworkManagerRoutingGroupItem, + NetworkManagerSecurityGroupItem, + NetworkProfile, + NetworkProfileListResult, + NetworkRule, + NetworkSecurityGroup, + NetworkSecurityGroupListResult, + NetworkSecurityGroupResult, + NetworkSecurityRulesEvaluationResult, + NetworkVirtualAppliance, + NetworkVirtualApplianceConnection, + NetworkVirtualApplianceConnectionList, + NetworkVirtualApplianceInstanceIds, + NetworkVirtualApplianceListResult, + NetworkVirtualAppliancePropertiesFormatNetworkProfile, + 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, + PacketCaptureMachineScope, + PacketCaptureParameters, + PacketCaptureQueryStatusResult, + PacketCaptureResult, + PacketCaptureResultProperties, + PacketCaptureSettings, + PacketCaptureStorageLocation, + Parameter, + PartnerManagedResourceProperties, + PatchObject, + PatchRouteFilter, + PatchRouteFilterRule, + PeerExpressRouteCircuitConnection, + PeerExpressRouteCircuitConnectionListResult, + PeerRoute, + PolicySettings, + PolicySettingsLogScrubbing, + PoolAssociation, + PoolAssociationList, + PoolUsage, + PrepareNetworkPoliciesRequest, + PrivateDnsZoneConfig, + PrivateDnsZoneGroup, + PrivateDnsZoneGroupListResult, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointIPConfiguration, + PrivateEndpointListResult, + PrivateLinkService, + PrivateLinkServiceConnection, + PrivateLinkServiceConnectionState, + PrivateLinkServiceIpConfiguration, + PrivateLinkServiceListResult, + PrivateLinkServicePropertiesAutoApproval, + PrivateLinkServicePropertiesVisibility, + PrivateLinkServiceVisibility, + Probe, + PropagatedRouteTable, + ProtocolConfiguration, + PublicIPAddress, + PublicIPAddressDnsSettings, + PublicIPAddressListResult, + PublicIPAddressSku, + PublicIPPrefix, + PublicIPPrefixListResult, + PublicIPPrefixSku, + PublicIpDdosProtectionStatusResult, + QosDefinition, + QosIpRange, + QosPortRange, + QueryInboundNatRulePortMappingRequest, + QueryRequestOptions, + QueryResults, + QueryTroubleshootingParameters, + RadiusServer, + ReachabilityAnalysisIntent, + ReachabilityAnalysisIntentListResult, + ReachabilityAnalysisIntentProperties, + ReachabilityAnalysisRun, + ReachabilityAnalysisRunListResult, + ReachabilityAnalysisRunProperties, + RecordSet, + ReferencedPublicIpAddress, + Resource, + ResourceBasics, + ResourceNavigationLink, + ResourceNavigationLinksListResult, + ResourceSet, + RetentionPolicyParameters, + Route, + RouteFilter, + RouteFilterListResult, + RouteFilterRule, + RouteFilterRuleListResult, + RouteListResult, + RouteMap, + RouteMapRule, + RouteTable, + RouteTableListResult, + RoutingConfiguration, + RoutingIntent, + RoutingPolicy, + RoutingRule, + RoutingRuleCollection, + RoutingRuleCollectionListResult, + RoutingRuleListResult, + RoutingRuleNextHop, + RoutingRuleRouteDestination, + ScopeConnection, + ScopeConnectionListResult, + SecurityAdminConfiguration, + SecurityAdminConfigurationListResult, + SecurityGroupNetworkInterface, + SecurityGroupViewParameters, + SecurityGroupViewResult, + SecurityPartnerProvider, + SecurityPartnerProviderListResult, + SecurityRule, + SecurityRuleAssociations, + SecurityRuleListResult, + SecurityUserConfiguration, + SecurityUserConfigurationListResult, + SecurityUserGroupItem, + SecurityUserRule, + SecurityUserRuleCollection, + SecurityUserRuleCollectionListResult, + SecurityUserRuleListResult, + ServiceAssociationLink, + ServiceAssociationLinksListResult, + ServiceEndpointPolicy, + ServiceEndpointPolicyDefinition, + ServiceEndpointPolicyDefinitionListResult, + ServiceEndpointPolicyListResult, + ServiceEndpointPropertiesFormat, + ServiceTagInformation, + ServiceTagInformationListResult, + ServiceTagInformationPropertiesFormat, + ServiceTagsListResult, + SessionIds, + SharedKeyProperties, + SignatureOverridesFilterValuesQuery, + SignatureOverridesFilterValuesResponse, + SignaturesOverrides, + SignaturesOverridesList, + SignaturesOverridesProperties, + SingleQueryResult, + Sku, + StaticCidr, + StaticCidrList, + StaticCidrProperties, + StaticMember, + StaticMemberListResult, + StaticRoute, + StaticRoutesConfig, + SubResource, + Subnet, + SubnetAssociation, + SubnetListResult, + SwapResource, + SwapResourceListResult, + SwapResourceProperties, + SystemData, + TagsObject, + Topology, + TopologyAssociation, + TopologyParameters, + TopologyResource, + TrafficAnalyticsConfigurationProperties, + TrafficAnalyticsProperties, + TrafficSelectorPolicy, + TroubleshootingDetails, + TroubleshootingParameters, + TroubleshootingRecommendedActions, + TroubleshootingResult, + TunnelConnectionHealth, + UnprepareNetworkPoliciesRequest, + Usage, + UsageName, + UsagesListResult, + VM, + VerificationIPFlowParameters, + VerificationIPFlowResult, + VerifierWorkspace, + VerifierWorkspaceListResult, + VerifierWorkspaceProperties, + VerifierWorkspaceUpdate, + VerifierWorkspaceUpdateProperties, + VirtualApplianceAdditionalNicProperties, + VirtualApplianceIPConfiguration, + VirtualApplianceIPConfigurationProperties, + VirtualApplianceNetworkInterfaceConfiguration, + VirtualApplianceNetworkInterfaceConfigurationProperties, + VirtualApplianceNicProperties, + VirtualApplianceSite, + VirtualApplianceSkuProperties, + VirtualHub, + VirtualHubEffectiveRoute, + VirtualHubEffectiveRouteList, + VirtualHubId, + VirtualHubRoute, + VirtualHubRouteTable, + VirtualHubRouteTableV2, + VirtualHubRouteV2, + VirtualNetwork, + VirtualNetworkBgpCommunities, + VirtualNetworkConnectionGatewayReference, + VirtualNetworkDdosProtectionStatusResult, + VirtualNetworkEncryption, + VirtualNetworkGateway, + VirtualNetworkGatewayAutoScaleBounds, + VirtualNetworkGatewayAutoScaleConfiguration, + VirtualNetworkGatewayConnection, + VirtualNetworkGatewayConnectionListEntity, + VirtualNetworkGatewayConnectionListResult, + VirtualNetworkGatewayIPConfiguration, + VirtualNetworkGatewayListConnectionsResult, + VirtualNetworkGatewayListResult, + VirtualNetworkGatewayNatRule, + VirtualNetworkGatewayPolicyGroup, + VirtualNetworkGatewayPolicyGroupMember, + VirtualNetworkGatewaySku, + VirtualNetworkListResult, + VirtualNetworkListUsageResult, + VirtualNetworkPeering, + VirtualNetworkPeeringListResult, + VirtualNetworkTap, + VirtualNetworkTapListResult, + VirtualNetworkUsage, + VirtualNetworkUsageName, + VirtualRouter, + VirtualRouterAutoScaleConfiguration, + VirtualRouterListResult, + VirtualRouterPeering, + VirtualRouterPeeringListResult, + VirtualWAN, + VirtualWanSecurityProvider, + VirtualWanSecurityProviders, + VirtualWanVpnProfileParameters, + VnetRoute, + VngClientConnectionConfiguration, + 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, + WebApplicationFirewallScrubbingRules, ) -from ._models_py3 import ConfigurationGroup -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 ConnectionMonitorEndpointLocationDetails -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 ConnectionSharedKeyResult -from ._models_py3 import ConnectionSharedKeyResultList -from ._models_py3 import ConnectionStateSnapshot -from ._models_py3 import ConnectivityConfiguration -from ._models_py3 import ConnectivityConfigurationListResult -from ._models_py3 import ConnectivityDestination -from ._models_py3 import ConnectivityGroupItem -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 Criterion -from ._models_py3 import CrossTenantScopes -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 DefaultAdminRule -from ._models_py3 import Delegation -from ._models_py3 import DelegationProperties -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 EffectiveBaseSecurityAdminRule -from ._models_py3 import EffectiveConnectivityConfiguration -from ._models_py3 import EffectiveDefaultSecurityAdminRule -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 EffectiveRouteMapRoute -from ._models_py3 import EffectiveRouteMapRouteList -from ._models_py3 import EffectiveRoutesParameters -from ._models_py3 import EffectiveSecurityAdminRule -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 ExceptionEntry -from ._models_py3 import ExclusionManagedRule -from ._models_py3 import ExclusionManagedRuleGroup -from ._models_py3 import ExclusionManagedRuleSet -from ._models_py3 import ExplicitProxy -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 ExpressRouteProviderPort -from ._models_py3 import ExpressRouteProviderPortListResult -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 FirewallPacketCaptureParameters -from ._models_py3 import FirewallPolicy -from ._models_py3 import FirewallPolicyCertificateAuthority -from ._models_py3 import FirewallPolicyDraft -from ._models_py3 import FirewallPolicyFilterRuleCollection -from ._models_py3 import FirewallPolicyFilterRuleCollectionAction -from ._models_py3 import FirewallPolicyHttpHeaderToInsert -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 FirewallPolicyRuleCollectionGroupDraft -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 GetInboundRoutesParameters -from ._models_py3 import GetOutboundRoutesParameters -from ._models_py3 import GetVpnSitesConfigurationRequest -from ._models_py3 import GroupByUserSession -from ._models_py3 import GroupByVariable -from ._models_py3 import HTTPConfiguration -from ._models_py3 import HTTPHeader -from ._models_py3 import HeaderValueMatcher -from ._models_py3 import HopLink -from ._models_py3 import Hub -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 IPPrefixesList -from ._models_py3 import IPRule -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 InternetIngressPublicIpsProperties -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 ListRouteMapsResult -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 MigrateLoadBalancerToIpBasedRequest -from ._models_py3 import MigratedPools -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 NetworkGroup -from ._models_py3 import NetworkGroupListResult -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 NetworkManager -from ._models_py3 import NetworkManagerCommit -from ._models_py3 import NetworkManagerConnection -from ._models_py3 import NetworkManagerConnectionListResult -from ._models_py3 import NetworkManagerDeploymentStatus -from ._models_py3 import NetworkManagerDeploymentStatusListResult -from ._models_py3 import NetworkManagerDeploymentStatusParameter -from ._models_py3 import NetworkManagerEffectiveConnectivityConfigurationListResult -from ._models_py3 import NetworkManagerEffectiveSecurityAdminRulesListResult -from ._models_py3 import NetworkManagerListResult -from ._models_py3 import NetworkManagerPropertiesNetworkManagerScopes -from ._models_py3 import NetworkManagerRoutingConfiguration -from ._models_py3 import NetworkManagerRoutingConfigurationListResult -from ._models_py3 import NetworkManagerRoutingGroupItem -from ._models_py3 import NetworkManagerSecurityGroupItem -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 NetworkVirtualApplianceConnection -from ._models_py3 import NetworkVirtualApplianceConnectionList -from ._models_py3 import NetworkVirtualApplianceInstanceIds -from ._models_py3 import NetworkVirtualApplianceListResult -from ._models_py3 import NetworkVirtualAppliancePropertiesFormatNetworkProfile -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 PacketCaptureMachineScope -from ._models_py3 import PacketCaptureParameters -from ._models_py3 import PacketCaptureQueryStatusResult -from ._models_py3 import PacketCaptureResult -from ._models_py3 import PacketCaptureResultProperties -from ._models_py3 import PacketCaptureSettings -from ._models_py3 import PacketCaptureStorageLocation -from ._models_py3 import Parameter -from ._models_py3 import PartnerManagedResourceProperties -from ._models_py3 import PatchObject -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 PolicySettings -from ._models_py3 import PolicySettingsLogScrubbing -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 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 PublicIpDdosProtectionStatusResult -from ._models_py3 import QosDefinition -from ._models_py3 import QosIpRange -from ._models_py3 import QosPortRange -from ._models_py3 import QueryInboundNatRulePortMappingRequest -from ._models_py3 import QueryRequestOptions -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 RouteMap -from ._models_py3 import RouteMapRule -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 RoutingRule -from ._models_py3 import RoutingRuleCollection -from ._models_py3 import RoutingRuleCollectionListResult -from ._models_py3 import RoutingRuleListResult -from ._models_py3 import RoutingRuleNextHop -from ._models_py3 import RoutingRuleRouteDestination -from ._models_py3 import ScopeConnection -from ._models_py3 import ScopeConnectionListResult -from ._models_py3 import SecurityAdminConfiguration -from ._models_py3 import SecurityAdminConfigurationListResult -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 SecurityUserConfiguration -from ._models_py3 import SecurityUserConfigurationListResult -from ._models_py3 import SecurityUserGroupItem -from ._models_py3 import SecurityUserRule -from ._models_py3 import SecurityUserRuleCollection -from ._models_py3 import SecurityUserRuleCollectionListResult -from ._models_py3 import SecurityUserRuleListResult -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 SharedKeyProperties -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 StaticMember -from ._models_py3 import StaticMemberListResult -from ._models_py3 import StaticRoute -from ._models_py3 import StaticRoutesConfig -from ._models_py3 import SubResource -from ._models_py3 import Subnet -from ._models_py3 import SubnetAssociation -from ._models_py3 import SubnetListResult -from ._models_py3 import SwapResource -from ._models_py3 import SwapResourceListResult -from ._models_py3 import SwapResourceProperties -from ._models_py3 import SystemData -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 VirtualApplianceAdditionalNicProperties -from ._models_py3 import VirtualApplianceIPConfiguration -from ._models_py3 import VirtualApplianceIPConfigurationProperties -from ._models_py3 import VirtualApplianceNetworkInterfaceConfiguration -from ._models_py3 import VirtualApplianceNetworkInterfaceConfigurationProperties -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 VirtualNetworkDdosProtectionStatusResult -from ._models_py3 import VirtualNetworkEncryption -from ._models_py3 import VirtualNetworkGateway -from ._models_py3 import VirtualNetworkGatewayAutoScaleBounds -from ._models_py3 import VirtualNetworkGatewayAutoScaleConfiguration -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 VirtualNetworkGatewayPolicyGroup -from ._models_py3 import VirtualNetworkGatewayPolicyGroupMember -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 VirtualRouterAutoScaleConfiguration -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 VngClientConnectionConfiguration -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 ._models_py3 import WebApplicationFirewallScrubbingRules -from ._network_management_client_enums import Access -from ._network_management_client_enums import ActionType -from ._network_management_client_enums import AddressPrefixType -from ._network_management_client_enums import AdminRuleKind -from ._network_management_client_enums import AdminState -from ._network_management_client_enums import ApplicationGatewayBackendHealthServerHealth -from ._network_management_client_enums import ApplicationGatewayClientRevocationOptions -from ._network_management_client_enums import ApplicationGatewayCookieBasedAffinity -from ._network_management_client_enums import ApplicationGatewayCustomErrorStatusCode -from ._network_management_client_enums import ApplicationGatewayFirewallMode -from ._network_management_client_enums import ApplicationGatewayFirewallRateLimitDuration -from ._network_management_client_enums import ApplicationGatewayFirewallUserSessionVariable -from ._network_management_client_enums import ApplicationGatewayLoadDistributionAlgorithm -from ._network_management_client_enums import ApplicationGatewayOperationalState -from ._network_management_client_enums import ApplicationGatewayProtocol -from ._network_management_client_enums import ApplicationGatewayRedirectType -from ._network_management_client_enums import ApplicationGatewayRequestRoutingRuleType -from ._network_management_client_enums import ApplicationGatewayRuleSetStatusOptions -from ._network_management_client_enums import ApplicationGatewaySkuFamily -from ._network_management_client_enums import ApplicationGatewaySkuName -from ._network_management_client_enums import ApplicationGatewaySslCipherSuite -from ._network_management_client_enums import ApplicationGatewaySslPolicyName -from ._network_management_client_enums import ApplicationGatewaySslPolicyType -from ._network_management_client_enums import ApplicationGatewaySslProtocol -from ._network_management_client_enums import ApplicationGatewayTier -from ._network_management_client_enums import ApplicationGatewayTierTypes -from ._network_management_client_enums import ApplicationGatewayWafRuleActionTypes -from ._network_management_client_enums import ApplicationGatewayWafRuleSensitivityTypes -from ._network_management_client_enums import ApplicationGatewayWafRuleStateTypes -from ._network_management_client_enums import AssociationType -from ._network_management_client_enums import AuthenticationMethod -from ._network_management_client_enums import AuthorizationUseStatus -from ._network_management_client_enums import AutoLearnPrivateRangesMode -from ._network_management_client_enums import AzureFirewallApplicationRuleProtocolType -from ._network_management_client_enums import AzureFirewallNatRCActionType -from ._network_management_client_enums import AzureFirewallNetworkRuleProtocol -from ._network_management_client_enums import AzureFirewallPacketCaptureFlagsType -from ._network_management_client_enums import AzureFirewallRCActionType -from ._network_management_client_enums import AzureFirewallSkuName -from ._network_management_client_enums import AzureFirewallSkuTier -from ._network_management_client_enums import AzureFirewallThreatIntelMode -from ._network_management_client_enums import BastionConnectProtocol -from ._network_management_client_enums import BastionHostSkuName -from ._network_management_client_enums import BgpPeerState -from ._network_management_client_enums import CircuitConnectionStatus -from ._network_management_client_enums import CommissionedState -from ._network_management_client_enums import ConfigurationType -from ._network_management_client_enums import ConnectionMonitorEndpointFilterItemType -from ._network_management_client_enums import ConnectionMonitorEndpointFilterType -from ._network_management_client_enums import ConnectionMonitorSourceStatus -from ._network_management_client_enums import ConnectionMonitorTestConfigurationProtocol -from ._network_management_client_enums import ConnectionMonitorType -from ._network_management_client_enums import ConnectionState -from ._network_management_client_enums import ConnectionStatus -from ._network_management_client_enums import ConnectivityTopology -from ._network_management_client_enums import CoverageLevel -from ._network_management_client_enums import CreatedByType -from ._network_management_client_enums import CustomIpPrefixType -from ._network_management_client_enums import DdosSettingsProtectionMode -from ._network_management_client_enums import DeleteExistingPeering -from ._network_management_client_enums import DeleteOptions -from ._network_management_client_enums import DeploymentStatus -from ._network_management_client_enums import DestinationPortBehavior -from ._network_management_client_enums import DhGroup -from ._network_management_client_enums import Direction -from ._network_management_client_enums import DisableBgpRoutePropagation -from ._network_management_client_enums import EffectiveAdminRuleKind -from ._network_management_client_enums import EffectiveRouteSource -from ._network_management_client_enums import EffectiveRouteState -from ._network_management_client_enums import EffectiveSecurityRuleProtocol -from ._network_management_client_enums import EndpointType -from ._network_management_client_enums import EvaluationState -from ._network_management_client_enums import ExceptionEntryMatchVariable -from ._network_management_client_enums import ExceptionEntrySelectorMatchOperator -from ._network_management_client_enums import ExceptionEntryValueMatchOperator -from ._network_management_client_enums import ExpressRouteCircuitPeeringAdvertisedPublicPrefixState -from ._network_management_client_enums import ExpressRouteCircuitPeeringState -from ._network_management_client_enums import ExpressRouteCircuitSkuFamily -from ._network_management_client_enums import ExpressRouteCircuitSkuTier -from ._network_management_client_enums import ExpressRouteLinkAdminState -from ._network_management_client_enums import ExpressRouteLinkConnectorType -from ._network_management_client_enums import ExpressRouteLinkMacSecCipher -from ._network_management_client_enums import ExpressRouteLinkMacSecSciState -from ._network_management_client_enums import ExpressRoutePeeringState -from ._network_management_client_enums import ExpressRoutePeeringType -from ._network_management_client_enums import ExpressRoutePortAuthorizationUseStatus -from ._network_management_client_enums import ExpressRoutePortsBillingType -from ._network_management_client_enums import ExpressRoutePortsEncapsulation -from ._network_management_client_enums import ExtendedLocationTypes -from ._network_management_client_enums import FirewallPolicyFilterRuleCollectionActionType -from ._network_management_client_enums import FirewallPolicyIDPSQuerySortOrder -from ._network_management_client_enums import FirewallPolicyIDPSSignatureDirection -from ._network_management_client_enums import FirewallPolicyIDPSSignatureMode -from ._network_management_client_enums import FirewallPolicyIDPSSignatureSeverity -from ._network_management_client_enums import FirewallPolicyIntrusionDetectionProfileType -from ._network_management_client_enums import FirewallPolicyIntrusionDetectionProtocol -from ._network_management_client_enums import FirewallPolicyIntrusionDetectionStateType -from ._network_management_client_enums import FirewallPolicyNatRuleCollectionActionType -from ._network_management_client_enums import FirewallPolicyRuleApplicationProtocolType -from ._network_management_client_enums import FirewallPolicyRuleCollectionType -from ._network_management_client_enums import FirewallPolicyRuleNetworkProtocol -from ._network_management_client_enums import FirewallPolicyRuleType -from ._network_management_client_enums import FirewallPolicySkuTier -from ._network_management_client_enums import FlowLogFormatType -from ._network_management_client_enums import GatewayLoadBalancerTunnelInterfaceType -from ._network_management_client_enums import GatewayLoadBalancerTunnelProtocol -from ._network_management_client_enums import Geo -from ._network_management_client_enums import GroupConnectivity -from ._network_management_client_enums import GroupMemberType -from ._network_management_client_enums import HTTPConfigurationMethod -from ._network_management_client_enums import HTTPMethod -from ._network_management_client_enums import HubBgpConnectionStatus -from ._network_management_client_enums import HubRoutingPreference -from ._network_management_client_enums import HubVirtualNetworkConnectionStatus -from ._network_management_client_enums import IPAllocationMethod -from ._network_management_client_enums import IPVersion -from ._network_management_client_enums import IkeEncryption -from ._network_management_client_enums import IkeIntegrity -from ._network_management_client_enums import InboundSecurityRuleType -from ._network_management_client_enums import InboundSecurityRulesProtocol -from ._network_management_client_enums import IpAllocationType -from ._network_management_client_enums import IpFlowProtocol -from ._network_management_client_enums import IpsecEncryption -from ._network_management_client_enums import IpsecIntegrity -from ._network_management_client_enums import IsGlobal -from ._network_management_client_enums import IsWorkloadProtected -from ._network_management_client_enums import IssueType -from ._network_management_client_enums import LoadBalancerBackendAddressAdminState -from ._network_management_client_enums import LoadBalancerOutboundRuleProtocol -from ._network_management_client_enums import LoadBalancerSkuName -from ._network_management_client_enums import LoadBalancerSkuTier -from ._network_management_client_enums import LoadDistribution -from ._network_management_client_enums import ManagedRuleEnabledState -from ._network_management_client_enums import NatGatewaySkuName -from ._network_management_client_enums import NetworkIntentPolicyBasedService -from ._network_management_client_enums import NetworkInterfaceAuxiliaryMode -from ._network_management_client_enums import NetworkInterfaceAuxiliarySku -from ._network_management_client_enums import NetworkInterfaceMigrationPhase -from ._network_management_client_enums import NetworkInterfaceNicType -from ._network_management_client_enums import NetworkOperationStatus -from ._network_management_client_enums import NextHopType -from ._network_management_client_enums import NextStep -from ._network_management_client_enums import NicTypeInRequest -from ._network_management_client_enums import NicTypeInResponse -from ._network_management_client_enums import OfficeTrafficCategory -from ._network_management_client_enums import Origin -from ._network_management_client_enums import OutputType -from ._network_management_client_enums import OwaspCrsExclusionEntryMatchVariable -from ._network_management_client_enums import OwaspCrsExclusionEntrySelectorMatchOperator -from ._network_management_client_enums import PacketCaptureTargetType -from ._network_management_client_enums import PcError -from ._network_management_client_enums import PcProtocol -from ._network_management_client_enums import PcStatus -from ._network_management_client_enums import PfsGroup -from ._network_management_client_enums import PreferredIPVersion -from ._network_management_client_enums import PreferredRoutingGateway -from ._network_management_client_enums import PrivateEndpointVNetPolicies -from ._network_management_client_enums import ProbeNoHealthyBackendsBehavior -from ._network_management_client_enums import ProbeProtocol -from ._network_management_client_enums import ProcessorArchitecture -from ._network_management_client_enums import Protocol -from ._network_management_client_enums import ProtocolType -from ._network_management_client_enums import ProvisioningState -from ._network_management_client_enums import PublicIPAddressMigrationPhase -from ._network_management_client_enums import PublicIPAddressSkuName -from ._network_management_client_enums import PublicIPAddressSkuTier -from ._network_management_client_enums import PublicIPPrefixSkuName -from ._network_management_client_enums import PublicIPPrefixSkuTier -from ._network_management_client_enums import PublicIpAddressDnsSettingsDomainNameLabelScope -from ._network_management_client_enums import ResiliencyModel -from ._network_management_client_enums import ResourceIdentityType -from ._network_management_client_enums import RouteFilterRuleType -from ._network_management_client_enums import RouteMapActionType -from ._network_management_client_enums import RouteMapMatchCondition -from ._network_management_client_enums import RouteNextHopType -from ._network_management_client_enums import RoutingRuleDestinationType -from ._network_management_client_enums import RoutingRuleNextHopType -from ._network_management_client_enums import RoutingState -from ._network_management_client_enums import ScopeConnectionState -from ._network_management_client_enums import ScrubbingRuleEntryMatchOperator -from ._network_management_client_enums import ScrubbingRuleEntryMatchVariable -from ._network_management_client_enums import ScrubbingRuleEntryState -from ._network_management_client_enums import SecurityConfigurationRuleAccess -from ._network_management_client_enums import SecurityConfigurationRuleDirection -from ._network_management_client_enums import SecurityConfigurationRuleProtocol -from ._network_management_client_enums import SecurityPartnerProviderConnectionStatus -from ._network_management_client_enums import SecurityProviderName -from ._network_management_client_enums import SecurityRuleAccess -from ._network_management_client_enums import SecurityRuleDirection -from ._network_management_client_enums import SecurityRuleProtocol -from ._network_management_client_enums import SensitivityType -from ._network_management_client_enums import ServiceProviderProvisioningState -from ._network_management_client_enums import Severity -from ._network_management_client_enums import SharingScope -from ._network_management_client_enums import SlotType -from ._network_management_client_enums import SyncMode -from ._network_management_client_enums import SyncRemoteAddressSpace -from ._network_management_client_enums import TransportProtocol -from ._network_management_client_enums import TunnelConnectionStatus -from ._network_management_client_enums import UsageUnit -from ._network_management_client_enums import UseHubGateway -from ._network_management_client_enums import VerbosityLevel -from ._network_management_client_enums import VirtualNetworkEncryptionEnforcement -from ._network_management_client_enums import VirtualNetworkGatewayConnectionMode -from ._network_management_client_enums import VirtualNetworkGatewayConnectionProtocol -from ._network_management_client_enums import VirtualNetworkGatewayConnectionStatus -from ._network_management_client_enums import VirtualNetworkGatewayConnectionType -from ._network_management_client_enums import VirtualNetworkGatewaySkuName -from ._network_management_client_enums import VirtualNetworkGatewaySkuTier -from ._network_management_client_enums import VirtualNetworkGatewayType -from ._network_management_client_enums import VirtualNetworkPeeringLevel -from ._network_management_client_enums import VirtualNetworkPeeringState -from ._network_management_client_enums import VirtualNetworkPrivateEndpointNetworkPolicies -from ._network_management_client_enums import VirtualNetworkPrivateLinkServiceNetworkPolicies -from ._network_management_client_enums import VirtualWanSecurityProviderType -from ._network_management_client_enums import VnetLocalRouteOverrideCriteria -from ._network_management_client_enums import VpnAuthenticationType -from ._network_management_client_enums import VpnClientProtocol -from ._network_management_client_enums import VpnConnectionStatus -from ._network_management_client_enums import VpnGatewayGeneration -from ._network_management_client_enums import VpnGatewayTunnelingProtocol -from ._network_management_client_enums import VpnLinkConnectionMode -from ._network_management_client_enums import VpnNatRuleMode -from ._network_management_client_enums import VpnNatRuleType -from ._network_management_client_enums import VpnPolicyMemberAttributeType -from ._network_management_client_enums import VpnType -from ._network_management_client_enums import WebApplicationFirewallAction -from ._network_management_client_enums import WebApplicationFirewallEnabledState -from ._network_management_client_enums import WebApplicationFirewallMatchVariable -from ._network_management_client_enums import WebApplicationFirewallMode -from ._network_management_client_enums import WebApplicationFirewallOperator -from ._network_management_client_enums import WebApplicationFirewallPolicyResourceState -from ._network_management_client_enums import WebApplicationFirewallRuleType -from ._network_management_client_enums import WebApplicationFirewallScrubbingState -from ._network_management_client_enums import WebApplicationFirewallState -from ._network_management_client_enums import WebApplicationFirewallTransform +from ._network_management_client_enums import ( # type: ignore + Access, + ActionType, + AddressPrefixType, + AddressSpaceAggregationOption, + AdminRuleKind, + AdminState, + ApplicationGatewayBackendHealthServerHealth, + ApplicationGatewayClientRevocationOptions, + ApplicationGatewayCookieBasedAffinity, + ApplicationGatewayCustomErrorStatusCode, + ApplicationGatewayFirewallMode, + ApplicationGatewayFirewallRateLimitDuration, + ApplicationGatewayFirewallUserSessionVariable, + ApplicationGatewayLoadDistributionAlgorithm, + ApplicationGatewayOperationalState, + ApplicationGatewayProtocol, + ApplicationGatewayRedirectType, + ApplicationGatewayRequestRoutingRuleType, + ApplicationGatewayRuleSetStatusOptions, + ApplicationGatewaySkuFamily, + ApplicationGatewaySkuName, + ApplicationGatewaySslCipherSuite, + ApplicationGatewaySslPolicyName, + ApplicationGatewaySslPolicyType, + ApplicationGatewaySslProtocol, + ApplicationGatewayTier, + ApplicationGatewayTierTypes, + ApplicationGatewayWafRuleActionTypes, + ApplicationGatewayWafRuleSensitivityTypes, + ApplicationGatewayWafRuleStateTypes, + AssociationType, + AuthenticationMethod, + AuthorizationUseStatus, + AutoLearnPrivateRangesMode, + AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRCActionType, + AzureFirewallNetworkRuleProtocol, + AzureFirewallPacketCaptureFlagsType, + AzureFirewallRCActionType, + AzureFirewallSkuName, + AzureFirewallSkuTier, + AzureFirewallThreatIntelMode, + BastionConnectProtocol, + BastionHostSkuName, + BgpPeerState, + CircuitConnectionStatus, + CommissionedState, + ConfigurationType, + ConnectionMonitorEndpointFilterItemType, + ConnectionMonitorEndpointFilterType, + ConnectionMonitorSourceStatus, + ConnectionMonitorTestConfigurationProtocol, + ConnectionMonitorType, + ConnectionState, + ConnectionStatus, + ConnectivityTopology, + CoverageLevel, + CreatedByType, + CustomIpPrefixType, + DdosSettingsProtectionMode, + DeleteExistingPeering, + DeleteOptions, + DeploymentStatus, + DestinationPortBehavior, + DhGroup, + Direction, + DisableBgpRoutePropagation, + EffectiveAdminRuleKind, + EffectiveRouteSource, + EffectiveRouteState, + EffectiveSecurityRuleProtocol, + EndpointType, + EvaluationState, + ExceptionEntryMatchVariable, + ExceptionEntrySelectorMatchOperator, + ExceptionEntryValueMatchOperator, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + ExpressRouteCircuitPeeringState, + ExpressRouteCircuitSkuFamily, + ExpressRouteCircuitSkuTier, + ExpressRouteLinkAdminState, + ExpressRouteLinkConnectorType, + ExpressRouteLinkMacSecCipher, + ExpressRouteLinkMacSecSciState, + ExpressRoutePeeringState, + ExpressRoutePeeringType, + ExpressRoutePortAuthorizationUseStatus, + ExpressRoutePortsBillingType, + ExpressRoutePortsEncapsulation, + ExtendedLocationTypes, + FailoverConnectionStatus, + FailoverTestStatus, + FailoverTestStatusForSingleTest, + FailoverTestType, + FirewallPolicyFilterRuleCollectionActionType, + FirewallPolicyIDPSQuerySortOrder, + FirewallPolicyIDPSSignatureDirection, + FirewallPolicyIDPSSignatureMode, + FirewallPolicyIDPSSignatureSeverity, + FirewallPolicyIntrusionDetectionProfileType, + FirewallPolicyIntrusionDetectionProtocol, + FirewallPolicyIntrusionDetectionStateType, + FirewallPolicyNatRuleCollectionActionType, + FirewallPolicyRuleApplicationProtocolType, + FirewallPolicyRuleCollectionType, + FirewallPolicyRuleNetworkProtocol, + FirewallPolicyRuleType, + FirewallPolicySkuTier, + FlowLogFormatType, + GatewayLoadBalancerTunnelInterfaceType, + GatewayLoadBalancerTunnelProtocol, + Geo, + GroupConnectivity, + GroupMemberType, + HTTPConfigurationMethod, + HTTPMethod, + HubBgpConnectionStatus, + HubRoutingPreference, + HubVirtualNetworkConnectionStatus, + IPAllocationMethod, + IPVersion, + IkeEncryption, + IkeIntegrity, + InboundSecurityRuleType, + InboundSecurityRulesProtocol, + IpAllocationType, + IpFlowProtocol, + IpType, + IpsecEncryption, + IpsecIntegrity, + IsGlobal, + IsWorkloadProtected, + IssueType, + LoadBalancerBackendAddressAdminState, + LoadBalancerOutboundRuleProtocol, + LoadBalancerSkuName, + LoadBalancerSkuTier, + LoadDistribution, + ManagedRuleEnabledState, + NatGatewaySkuName, + NetworkIntentPolicyBasedService, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + NetworkInterfaceMigrationPhase, + NetworkInterfaceNicType, + NetworkOperationStatus, + NetworkProtocol, + NextHopType, + NextStep, + NicTypeInRequest, + NicTypeInResponse, + OfficeTrafficCategory, + Origin, + OutputType, + OwaspCrsExclusionEntryMatchVariable, + OwaspCrsExclusionEntrySelectorMatchOperator, + PacketCaptureTargetType, + PcError, + PcProtocol, + PcStatus, + PfsGroup, + PreferredIPVersion, + PreferredRoutingGateway, + PrivateEndpointVNetPolicies, + ProbeNoHealthyBackendsBehavior, + ProbeProtocol, + ProcessorArchitecture, + Protocol, + ProtocolType, + ProvisioningState, + PublicIPAddressMigrationPhase, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPPrefixSkuName, + PublicIPPrefixSkuTier, + PublicIpAddressDnsSettingsDomainNameLabelScope, + ResiliencyModel, + ResourceIdentityType, + RouteFilterRuleType, + RouteMapActionType, + RouteMapMatchCondition, + RouteNextHopType, + RoutingRuleDestinationType, + RoutingRuleNextHopType, + RoutingState, + ScopeConnectionState, + ScrubbingRuleEntryMatchOperator, + ScrubbingRuleEntryMatchVariable, + ScrubbingRuleEntryState, + SecurityConfigurationRuleAccess, + SecurityConfigurationRuleDirection, + SecurityConfigurationRuleProtocol, + SecurityPartnerProviderConnectionStatus, + SecurityProviderName, + SecurityRuleAccess, + SecurityRuleDirection, + SecurityRuleProtocol, + SensitivityType, + ServiceProviderProvisioningState, + Severity, + SharingScope, + SlotType, + SyncMode, + SyncRemoteAddressSpace, + TransportProtocol, + TunnelConnectionStatus, + UsageUnit, + UseHubGateway, + VerbosityLevel, + VirtualNetworkEncryptionEnforcement, + VirtualNetworkGatewayConnectionMode, + VirtualNetworkGatewayConnectionProtocol, + VirtualNetworkGatewayConnectionStatus, + VirtualNetworkGatewayConnectionType, + VirtualNetworkGatewaySkuName, + VirtualNetworkGatewaySkuTier, + VirtualNetworkGatewayType, + VirtualNetworkPeeringLevel, + VirtualNetworkPeeringState, + VirtualNetworkPrivateEndpointNetworkPolicies, + VirtualNetworkPrivateLinkServiceNetworkPolicies, + VirtualWanSecurityProviderType, + VnetLocalRouteOverrideCriteria, + VpnAuthenticationType, + VpnClientProtocol, + VpnConnectionStatus, + VpnGatewayGeneration, + VpnGatewayTunnelingProtocol, + VpnLinkConnectionMode, + VpnNatRuleMode, + VpnNatRuleType, + VpnPolicyMemberAttributeType, + VpnType, + WebApplicationFirewallAction, + WebApplicationFirewallEnabledState, + WebApplicationFirewallMatchVariable, + WebApplicationFirewallMode, + WebApplicationFirewallOperator, + WebApplicationFirewallPolicyResourceState, + WebApplicationFirewallRuleType, + WebApplicationFirewallScrubbingState, + WebApplicationFirewallState, + WebApplicationFirewallTransform, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -1129,6 +1187,12 @@ "CheckPrivateLinkServiceVisibilityRequest", "ChildResource", "CloudErrorBody", + "CommonErrorAdditionalInfo", + "CommonErrorDetail", + "CommonErrorResponse", + "CommonProxyResource", + "CommonResource", + "CommonTrackedResource", "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", "ConfigurationGroup", "ConnectionMonitor", @@ -1242,6 +1306,12 @@ "ExpressRouteCrossConnectionPeeringList", "ExpressRouteCrossConnectionRoutesTableSummary", "ExpressRouteCrossConnectionsRoutesTableSummaryListResult", + "ExpressRouteFailoverCircuitResourceDetails", + "ExpressRouteFailoverConnectionResourceDetails", + "ExpressRouteFailoverRedundantRoute", + "ExpressRouteFailoverSingleTestDetails", + "ExpressRouteFailoverStopApiParameters", + "ExpressRouteFailoverTestDetails", "ExpressRouteGateway", "ExpressRouteGatewayList", "ExpressRouteGatewayPropertiesAutoScaleConfiguration", @@ -1262,6 +1332,7 @@ "ExpressRouteServiceProviderBandwidthsOffered", "ExpressRouteServiceProviderListResult", "ExtendedLocation", + "FailoverConnectionDetails", "FilterItems", "FirewallPacketCaptureParameters", "FirewallPolicy", @@ -1326,18 +1397,26 @@ "IPConfigurationProfile", "IPPrefixesList", "IPRule", + "IPTraffic", "InboundNatPool", "InboundNatRule", "InboundNatRuleListResult", "InboundNatRulePortMapping", "InboundSecurityRule", "InboundSecurityRules", + "IntentContent", "InternetIngressPublicIpsProperties", "IpAllocation", "IpAllocationListResult", "IpGroup", "IpGroupListResult", "IpTag", + "IpamPool", + "IpamPoolList", + "IpamPoolPrefixAllocation", + "IpamPoolProperties", + "IpamPoolUpdate", + "IpamPoolUpdateProperties", "IpsecPolicy", "Ipv6CircuitConnectionConfig", "Ipv6ExpressRouteCircuitPeeringConfig", @@ -1364,6 +1443,8 @@ "LoadBalancerBackendAddress", "LoadBalancerBackendAddressPoolListResult", "LoadBalancerFrontendIPConfigurationListResult", + "LoadBalancerHealthPerRule", + "LoadBalancerHealthPerRulePerBackendAddress", "LoadBalancerListResult", "LoadBalancerLoadBalancingRuleListResult", "LoadBalancerOutboundRuleListResult", @@ -1481,6 +1562,9 @@ "PeerRoute", "PolicySettings", "PolicySettingsLogScrubbing", + "PoolAssociation", + "PoolAssociationList", + "PoolUsage", "PrepareNetworkPoliciesRequest", "PrivateDnsZoneConfig", "PrivateDnsZoneGroup", @@ -1517,9 +1601,16 @@ "QueryResults", "QueryTroubleshootingParameters", "RadiusServer", + "ReachabilityAnalysisIntent", + "ReachabilityAnalysisIntentListResult", + "ReachabilityAnalysisIntentProperties", + "ReachabilityAnalysisRun", + "ReachabilityAnalysisRunListResult", + "ReachabilityAnalysisRunProperties", "RecordSet", "ReferencedPublicIpAddress", "Resource", + "ResourceBasics", "ResourceNavigationLink", "ResourceNavigationLinksListResult", "ResourceSet", @@ -1582,6 +1673,9 @@ "SignaturesOverridesProperties", "SingleQueryResult", "Sku", + "StaticCidr", + "StaticCidrList", + "StaticCidrProperties", "StaticMember", "StaticMemberListResult", "StaticRoute", @@ -1614,6 +1708,11 @@ "VM", "VerificationIPFlowParameters", "VerificationIPFlowResult", + "VerifierWorkspace", + "VerifierWorkspaceListResult", + "VerifierWorkspaceProperties", + "VerifierWorkspaceUpdate", + "VerifierWorkspaceUpdateProperties", "VirtualApplianceAdditionalNicProperties", "VirtualApplianceIPConfiguration", "VirtualApplianceIPConfigurationProperties", @@ -1709,6 +1808,7 @@ "Access", "ActionType", "AddressPrefixType", + "AddressSpaceAggregationOption", "AdminRuleKind", "AdminState", "ApplicationGatewayBackendHealthServerHealth", @@ -1795,6 +1895,10 @@ "ExpressRoutePortsBillingType", "ExpressRoutePortsEncapsulation", "ExtendedLocationTypes", + "FailoverConnectionStatus", + "FailoverTestStatus", + "FailoverTestStatusForSingleTest", + "FailoverTestType", "FirewallPolicyFilterRuleCollectionActionType", "FirewallPolicyIDPSQuerySortOrder", "FirewallPolicyIDPSSignatureDirection", @@ -1828,6 +1932,7 @@ "InboundSecurityRulesProtocol", "IpAllocationType", "IpFlowProtocol", + "IpType", "IpsecEncryption", "IpsecIntegrity", "IsGlobal", @@ -1846,6 +1951,7 @@ "NetworkInterfaceMigrationPhase", "NetworkInterfaceNicType", "NetworkOperationStatus", + "NetworkProtocol", "NextHopType", "NextStep", "NicTypeInRequest", @@ -1943,5 +2049,5 @@ "WebApplicationFirewallState", "WebApplicationFirewallTransform", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py index 338565a9aa6a..43b6993c0d7a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py @@ -1,5 +1,5 @@ -# coding=utf-8 # 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. @@ -13,7 +13,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -231,7 +230,7 @@ class EffectiveConnectivityConfiguration(_serialization.Model): :ivar applies_to_groups: Groups for configuration. :vartype applies_to_groups: list[~azure.mgmt.network.models.ConnectivityGroupItem] :ivar provisioning_state: The provisioning state of the connectivity configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar delete_existing_peering: Flag if need to remove current existing peerings. Known values are: "False" and "True". @@ -304,9 +303,7 @@ def __init__( self.resource_guid = None -class ActiveConnectivityConfiguration( - EffectiveConnectivityConfiguration -): # pylint: disable=too-many-instance-attributes +class ActiveConnectivityConfiguration(EffectiveConnectivityConfiguration): """Active connectivity configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -327,7 +324,7 @@ class ActiveConnectivityConfiguration( :ivar applies_to_groups: Groups for configuration. :vartype applies_to_groups: list[~azure.mgmt.network.models.ConnectivityGroupItem] :ivar provisioning_state: The provisioning state of the connectivity configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar delete_existing_peering: Flag if need to remove current existing peerings. Known values are: "False" and "True". @@ -449,7 +446,7 @@ def __init__( self.skip_token = skip_token -class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): # pylint: disable=too-many-instance-attributes +class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): """Network default admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -499,8 +496,8 @@ class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): # pylint: di :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -604,7 +601,7 @@ def __init__( self.resource_guid = None -class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): # pylint: disable=too-many-instance-attributes +class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): """Network admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -652,8 +649,8 @@ class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): # pylint: disable=t :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -816,7 +813,8 @@ class AddressPrefixItem(_serialization.Model): :ivar address_prefix: Address prefix. :vartype address_prefix: str - :ivar address_prefix_type: Address prefix type. Known values are: "IPPrefix" and "ServiceTag". + :ivar address_prefix_type: Address prefix type. Known values are: "IPPrefix", "ServiceTag", and + "NetworkGroup". :vartype address_prefix_type: str or ~azure.mgmt.network.models.AddressPrefixType """ @@ -835,8 +833,8 @@ def __init__( """ :keyword address_prefix: Address prefix. :paramtype address_prefix: str - :keyword address_prefix_type: Address prefix type. Known values are: "IPPrefix" and - "ServiceTag". + :keyword address_prefix_type: Address prefix type. Known values are: "IPPrefix", "ServiceTag", + and "NetworkGroup". :paramtype address_prefix_type: str or ~azure.mgmt.network.models.AddressPrefixType """ super().__init__(**kwargs) @@ -851,20 +849,34 @@ class AddressSpace(_serialization.Model): :ivar address_prefixes: A list of address blocks reserved for this virtual network in CIDR notation. :vartype address_prefixes: list[str] + :ivar ipam_pool_prefix_allocations: A list of IPAM Pools allocating IP address prefixes. + :vartype ipam_pool_prefix_allocations: + list[~azure.mgmt.network.models.IpamPoolPrefixAllocation] """ _attribute_map = { "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "ipam_pool_prefix_allocations": {"key": "ipamPoolPrefixAllocations", "type": "[IpamPoolPrefixAllocation]"}, } - def __init__(self, *, address_prefixes: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + ipam_pool_prefix_allocations: Optional[List["_models.IpamPoolPrefixAllocation"]] = None, + **kwargs: Any + ) -> None: """ :keyword address_prefixes: A list of address blocks reserved for this virtual network in CIDR notation. :paramtype address_prefixes: list[str] + :keyword ipam_pool_prefix_allocations: A list of IPAM Pools allocating IP address prefixes. + :paramtype ipam_pool_prefix_allocations: + list[~azure.mgmt.network.models.IpamPoolPrefixAllocation] """ super().__init__(**kwargs) self.address_prefixes = address_prefixes + self.ipam_pool_prefix_allocations = ipam_pool_prefix_allocations class ChildResource(_serialization.Model): @@ -957,7 +969,7 @@ def __init__(self, **kwargs: Any) -> None: self.system_data = None -class AdminRule(BaseAdminRule): # pylint: disable=too-many-instance-attributes +class AdminRule(BaseAdminRule): """Network admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -1000,8 +1012,8 @@ class AdminRule(BaseAdminRule): # pylint: disable=too-many-instance-attributes :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -1112,8 +1124,8 @@ class AdminRuleCollection(ChildResource): :vartype description: str :ivar applies_to_groups: Groups for configuration. :vartype applies_to_groups: list[~azure.mgmt.network.models.NetworkManagerSecurityGroupItem] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -1276,7 +1288,7 @@ def __init__( self.tags = tags -class ApplicationGateway(Resource): # pylint: disable=too-many-instance-attributes +class ApplicationGateway(Resource): """Application gateway resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1404,7 +1416,7 @@ class ApplicationGateway(Resource): # pylint: disable=too-many-instance-attribu :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar custom_error_configurations: Custom error configurations of the application gateway resource. @@ -1781,7 +1793,7 @@ class ApplicationGatewayAuthenticationCertificate(SubResource): # pylint: disab :ivar data: Certificate public data. :vartype data: str :ivar provisioning_state: The provisioning state of the authentication certificate resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -2042,7 +2054,7 @@ class ApplicationGatewayBackendAddressPool(SubResource): :ivar backend_addresses: Backend addresses. :vartype backend_addresses: list[~azure.mgmt.network.models.ApplicationGatewayBackendAddress] :ivar provisioning_state: The provisioning state of the backend address pool resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -2279,7 +2291,7 @@ def __init__( self.health_probe_log = health_probe_log -class ApplicationGatewayBackendHttpSettings(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -2327,7 +2339,7 @@ class ApplicationGatewayBackendHttpSettings(SubResource): # pylint: disable=too will be prefixed. Default value is null. :vartype path: str :ivar provisioning_state: The provisioning state of the backend HTTP settings resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -2439,7 +2451,7 @@ def __init__( self.provisioning_state = None -class ApplicationGatewayBackendSettings(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -2472,7 +2484,7 @@ class ApplicationGatewayBackendSettings(SubResource): # pylint: disable=too-man 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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -2940,7 +2952,7 @@ class ApplicationGatewayFirewallRuleSet(Resource): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar provisioning_state: The provisioning state of the web application firewall rule set. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar rule_set_type: The type of the web application firewall rule set. :vartype rule_set_type: str @@ -3059,7 +3071,7 @@ class ApplicationGatewayFrontendIPConfiguration(SubResource): # pylint: disable configuration. :vartype private_link_configuration: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -3141,7 +3153,7 @@ class ApplicationGatewayFrontendPort(SubResource): :ivar port: Frontend port. :vartype port: int :ivar provisioning_state: The provisioning state of the frontend port resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -3261,7 +3273,7 @@ def __init__( self.header_value = header_value -class ApplicationGatewayHttpListener(SubResource): # pylint: disable=too-many-instance-attributes +class ApplicationGatewayHttpListener(SubResource): """Http listener of an application gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -3291,7 +3303,7 @@ class ApplicationGatewayHttpListener(SubResource): # pylint: disable=too-many-i multi-hosting. :vartype require_server_name_indication: bool :ivar provisioning_state: The provisioning state of the HTTP listener resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar custom_error_configurations: Custom error configurations of the HTTP listener. :vartype custom_error_configurations: @@ -3413,7 +3425,8 @@ class ApplicationGatewayIPConfiguration(SubResource): its private address. :vartype subnet: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the application gateway IP configuration - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -3457,7 +3470,7 @@ def __init__( self.provisioning_state = None -class ApplicationGatewayListener(SubResource): # pylint: disable=too-many-instance-attributes +class ApplicationGatewayListener(SubResource): """Listener of an application gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -3481,7 +3494,7 @@ class ApplicationGatewayListener(SubResource): # pylint: disable=too-many-insta :ivar ssl_profile: SSL profile resource of the application gateway. :vartype ssl_profile: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the listener resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar host_names: List of Server Name Indications(SNI) for TLS Multi-site Listener that allows special wildcard characters as well. @@ -3608,7 +3621,7 @@ class ApplicationGatewayLoadDistributionPolicy(SubResource): :vartype load_distribution_algorithm: str or ~azure.mgmt.network.models.ApplicationGatewayLoadDistributionAlgorithm :ivar provisioning_state: The provisioning state of the Load Distribution Policy resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -3812,7 +3825,7 @@ def __init__( self.backend_http_settings = backend_http_settings -class ApplicationGatewayPathRule(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -3838,7 +3851,7 @@ class ApplicationGatewayPathRule(SubResource): # pylint: disable=too-many-insta :ivar load_distribution_policy: Load Distribution Policy resource of URL path map path rule. :vartype load_distribution_policy: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the path rule resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar firewall_policy: Reference to the FirewallPolicy resource. :vartype firewall_policy: ~azure.mgmt.network.models.SubResource @@ -3933,7 +3946,8 @@ class ApplicationGatewayPrivateEndpointConnection(SubResource): # pylint: disab :vartype private_link_service_connection_state: ~azure.mgmt.network.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state of the application gateway private endpoint - connection resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + connection resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", + "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar link_identifier: The consumer link id. :vartype link_identifier: str @@ -4040,7 +4054,8 @@ class ApplicationGatewayPrivateLinkConfiguration(SubResource): # pylint: disabl :vartype ip_configurations: list[~azure.mgmt.network.models.ApplicationGatewayPrivateLinkIpConfiguration] :ivar provisioning_state: The provisioning state of the application gateway private link - configuration. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + configuration. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -4111,7 +4126,8 @@ class ApplicationGatewayPrivateLinkIpConfiguration(SubResource): # pylint: disa :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + configuration. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -4266,7 +4282,7 @@ def __init__( self.next_link = next_link -class ApplicationGatewayProbe(SubResource): # pylint: disable=too-many-instance-attributes +class ApplicationGatewayProbe(SubResource): """Probe of the application gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -4309,7 +4325,7 @@ class ApplicationGatewayProbe(SubResource): # pylint: disable=too-many-instance :ivar match: Criterion for classifying a healthy probe response. :vartype match: ~azure.mgmt.network.models.ApplicationGatewayProbeHealthResponseMatch :ivar provisioning_state: The provisioning state of the probe resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.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 @@ -4449,7 +4465,7 @@ def __init__(self, *, body: Optional[str] = None, status_codes: Optional[List[st self.status_codes = status_codes -class ApplicationGatewayRedirectConfiguration(SubResource): # pylint: disable=too-many-instance-attributes +class ApplicationGatewayRedirectConfiguration(SubResource): """Redirect configuration of an application gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -4553,7 +4569,7 @@ def __init__( self.path_rules = path_rules -class ApplicationGatewayRequestRoutingRule(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -4585,7 +4601,7 @@ class ApplicationGatewayRequestRoutingRule(SubResource): # pylint: disable=too- :ivar load_distribution_policy: Load Distribution Policy resource of the application gateway. :vartype load_distribution_policy: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the request routing rule resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -4834,7 +4850,7 @@ class ApplicationGatewayRewriteRuleSet(SubResource): :ivar rewrite_rules: Rewrite rules in the rewrite rule set. :vartype rewrite_rules: list[~azure.mgmt.network.models.ApplicationGatewayRewriteRule] :ivar provisioning_state: The provisioning state of the rewrite rule set resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -4898,7 +4914,7 @@ class ApplicationGatewayRoutingRule(SubResource): :ivar listener: Listener resource of the application gateway. :vartype listener: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the request routing rule resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5041,7 +5057,7 @@ class ApplicationGatewaySslCertificate(SubResource): 'Certificate' object stored in KeyVault. :vartype key_vault_secret_id: str :ivar provisioning_state: The provisioning state of the SSL certificate resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5241,7 +5257,7 @@ class ApplicationGatewaySslProfile(SubResource): :vartype client_auth_configuration: ~azure.mgmt.network.models.ApplicationGatewayClientAuthConfiguration :ivar provisioning_state: The provisioning state of the HTTP listener resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5321,7 +5337,7 @@ class ApplicationGatewayTrustedClientCertificate(SubResource): # pylint: disabl :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. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5390,7 +5406,7 @@ class ApplicationGatewayTrustedRootCertificate(SubResource): 'Certificate' object stored in KeyVault. :vartype key_vault_secret_id: str :ivar provisioning_state: The provisioning state of the trusted root certificate resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5485,7 +5501,7 @@ def __init__( self.reroute = reroute -class ApplicationGatewayUrlPathMap(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -5512,7 +5528,7 @@ class ApplicationGatewayUrlPathMap(SubResource): # pylint: disable=too-many-ins :ivar path_rules: Path rule of URL path map resource. :vartype path_rules: list[~azure.mgmt.network.models.ApplicationGatewayPathRule] :ivar provisioning_state: The provisioning state of the URL path map resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -5830,7 +5846,7 @@ def __init__(self, *, name: Optional[str] = None, description: Optional[str] = N self.rule_type: Optional[str] = None -class ApplicationRule(FirewallPolicyRule): # pylint: disable=too-many-instance-attributes +class ApplicationRule(FirewallPolicyRule): """Rule of type application. All required parameters must be populated in order to send to server. @@ -5965,7 +5981,7 @@ class ApplicationSecurityGroup(Resource): across subscriptions or resource groups. :vartype resource_guid: str :ivar provisioning_state: The provisioning state of the application security group resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -6624,7 +6640,7 @@ def __init__( self.error = error -class AzureFirewall(Resource): # pylint: disable=too-many-instance-attributes +class AzureFirewall(Resource): """Azure Firewall resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -6658,7 +6674,7 @@ class AzureFirewall(Resource): # pylint: disable=too-many-instance-attributes traffic. :vartype management_ip_configuration: ~azure.mgmt.network.models.AzureFirewallIPConfiguration :ivar provisioning_state: The provisioning state of the Azure firewall resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar threat_intel_mode: The operation mode for Threat Intelligence. Known values are: "Alert", "Deny", and "Off". @@ -6896,7 +6912,7 @@ class AzureFirewallApplicationRuleCollection(SubResource): :ivar rules: Collection of rules used by a application rule collection. :vartype rules: list[~azure.mgmt.network.models.AzureFirewallApplicationRule] :ivar provisioning_state: The provisioning state of the application rule collection resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -7042,7 +7058,7 @@ class AzureFirewallFqdnTag(Resource): :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar fqdn_tag_name: The name of this FQDN Tag. :vartype fqdn_tag_name: str @@ -7145,7 +7161,8 @@ class AzureFirewallIPConfiguration(SubResource): subnet is not null. :vartype public_ip_address: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the Azure firewall IP configuration - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -7386,7 +7403,7 @@ class AzureFirewallNatRuleCollection(SubResource): :ivar rules: Collection of rules used by a NAT rule collection. :vartype rules: list[~azure.mgmt.network.models.AzureFirewallNatRule] :ivar provisioning_state: The provisioning state of the NAT rule collection resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -7538,7 +7555,7 @@ class AzureFirewallNetworkRuleCollection(SubResource): :ivar rules: Collection of rules used by a network rule collection. :vartype rules: list[~azure.mgmt.network.models.AzureFirewallNetworkRule] :ivar provisioning_state: The provisioning state of the network rule collection resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -8051,7 +8068,7 @@ def __init__( self.inbound_nat_rule_port_mappings = inbound_nat_rule_port_mappings -class BackendAddressPool(SubResource): # pylint: disable=too-many-instance-attributes +class BackendAddressPool(SubResource): """Pool of backend IP addresses. Variables are only populated by the server, and will be ignored when sending a request. @@ -8088,7 +8105,7 @@ class BackendAddressPool(SubResource): # pylint: disable=too-many-instance-attr address pool. :vartype inbound_nat_rules: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the backend address pool resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar drain_period_in_seconds: Amount of seconds Load Balancer waits for before sending RESET to client and backend address. @@ -8190,7 +8207,7 @@ def __init__( self.sync_mode = sync_mode -class BastionActiveSession(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BastionActiveSession(_serialization.Model): """The session detail for a target. Variables are only populated by the server, and will be ignored when sending a request. @@ -8295,7 +8312,7 @@ def __init__( self.next_link = next_link -class BastionHost(Resource): # pylint: disable=too-many-instance-attributes +class BastionHost(Resource): """Bastion Host resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -8326,7 +8343,7 @@ class BastionHost(Resource): # pylint: disable=too-many-instance-attributes :ivar network_acls: :vartype network_acls: ~azure.mgmt.network.models.BastionHostPropertiesFormatNetworkAcls :ivar provisioning_state: The provisioning state of the bastion host resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar scale_units: The scale units for the Bastion Host resource. :vartype scale_units: int @@ -8345,6 +8362,9 @@ class BastionHost(Resource): # pylint: disable=too-many-instance-attributes :ivar enable_session_recording: Enable/Disable Session Recording feature of the Bastion Host resource. :vartype enable_session_recording: bool + :ivar enable_private_only_bastion: Enable/Disable Private Only feature of the Bastion Host + resource. + :vartype enable_private_only_bastion: bool """ _validation = { @@ -8377,6 +8397,7 @@ class BastionHost(Resource): # pylint: disable=too-many-instance-attributes "enable_tunneling": {"key": "properties.enableTunneling", "type": "bool"}, "enable_kerberos": {"key": "properties.enableKerberos", "type": "bool"}, "enable_session_recording": {"key": "properties.enableSessionRecording", "type": "bool"}, + "enable_private_only_bastion": {"key": "properties.enablePrivateOnlyBastion", "type": "bool"}, } def __init__( @@ -8399,6 +8420,7 @@ def __init__( enable_tunneling: bool = False, enable_kerberos: bool = False, enable_session_recording: bool = False, + enable_private_only_bastion: bool = False, **kwargs: Any ) -> None: """ @@ -8438,6 +8460,9 @@ def __init__( :keyword enable_session_recording: Enable/Disable Session Recording feature of the Bastion Host resource. :paramtype enable_session_recording: bool + :keyword enable_private_only_bastion: Enable/Disable Private Only feature of the Bastion Host + resource. + :paramtype enable_private_only_bastion: bool """ super().__init__(id=id, location=location, tags=tags, **kwargs) self.zones = zones @@ -8456,6 +8481,7 @@ def __init__( self.enable_tunneling = enable_tunneling self.enable_kerberos = enable_kerberos self.enable_session_recording = enable_session_recording + self.enable_private_only_bastion = enable_private_only_bastion class BastionHostIPConfiguration(SubResource): @@ -8474,10 +8500,10 @@ class BastionHostIPConfiguration(SubResource): :vartype type: str :ivar subnet: Reference of the subnet resource. :vartype subnet: ~azure.mgmt.network.models.SubResource - :ivar public_ip_address: Reference of the PublicIP resource. + :ivar public_ip_address: Reference of the PublicIP resource. Null for private only bastion. :vartype public_ip_address: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the bastion host IP configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_ip_allocation_method: Private IP allocation method. Known values are: "Static" and "Dynamic". @@ -8519,7 +8545,7 @@ def __init__( :paramtype name: str :keyword subnet: Reference of the subnet resource. :paramtype subnet: ~azure.mgmt.network.models.SubResource - :keyword public_ip_address: Reference of the PublicIP resource. + :keyword public_ip_address: Reference of the PublicIP resource. Null for private only bastion. :paramtype public_ip_address: ~azure.mgmt.network.models.SubResource :keyword private_ip_allocation_method: Private IP allocation method. Known values are: "Static" and "Dynamic". @@ -8848,8 +8874,8 @@ class BgpConnection(SubResource): :ivar hub_virtual_network_connection: The reference to the HubVirtualNetworkConnection resource. :vartype hub_virtual_network_connection: ~azure.mgmt.network.models.SubResource - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar connection_state: The current state of the VirtualHub to Peer. Known values are: "Unknown", "Connecting", "Connected", and "NotConnected". @@ -9249,6 +9275,213 @@ def __init__( self.details = details +class CommonErrorAdditionalInfo(_serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: JSON + """ + + _validation = { + "type": {"readonly": True}, + "info": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type = None + self.info = None + + +class CommonErrorDetail(_serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.network.models.CommonErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.network.models.CommonErrorAdditionalInfo] + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[CommonErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[CommonErrorAdditionalInfo]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class CommonErrorResponse(_serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.network.models.CommonErrorDetail + """ + + _attribute_map = { + "error": {"key": "error", "type": "CommonErrorDetail"}, + } + + def __init__(self, *, error: Optional["_models.CommonErrorDetail"] = None, **kwargs: Any) -> None: + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.network.models.CommonErrorDetail + """ + super().__init__(**kwargs) + self.error = error + + +class CommonResource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class CommonProxyResource(CommonResource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + """ + + +class CommonTrackedResource(CommonResource): + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + """ + super().__init__(**kwargs) + self.tags = tags + self.location = location + + class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties( _serialization.Model ): # pylint: disable=name-too-long @@ -9292,7 +9525,7 @@ class ConfigurationGroup(_serialization.Model): "Subnet". :vartype member_type: str or ~azure.mgmt.network.models.GroupMemberType :ivar provisioning_state: The provisioning state of the scope assignment resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -9336,7 +9569,7 @@ def __init__( self.resource_guid = None -class ConnectionMonitor(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ConnectionMonitor(_serialization.Model): """Parameters that define the operation to create a connection monitor. :ivar location: Connection monitor location. @@ -10000,7 +10233,7 @@ def __init__( self.states = states -class ConnectionMonitorResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ConnectionMonitorResult(_serialization.Model): """Information about the connection monitor. Variables are only populated by the server, and will be ignored when sending a request. @@ -10037,7 +10270,7 @@ class ConnectionMonitorResult(_serialization.Model): # pylint: disable=too-many :ivar notes: Optional notes to be associated with the connection monitor. :vartype notes: str :ivar provisioning_state: The provisioning state of the connection monitor. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar start_time: The date and time when the connection monitor was started. :vartype start_time: ~datetime.datetime @@ -10146,7 +10379,7 @@ def __init__( self.connection_monitor_type = None -class ConnectionMonitorResultProperties(ConnectionMonitorParameters): # pylint: disable=too-many-instance-attributes +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. @@ -10171,7 +10404,7 @@ class ConnectionMonitorResultProperties(ConnectionMonitorParameters): # pylint: :ivar notes: Optional notes to be associated with the connection monitor. :vartype notes: str :ivar provisioning_state: The provisioning state of the connection monitor. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar start_time: The date and time when the connection monitor was started. :vartype start_time: ~datetime.datetime @@ -10787,7 +11020,7 @@ def __init__( self.hops = None -class ConnectivityConfiguration(ChildResource): # pylint: disable=too-many-instance-attributes +class ConnectivityConfiguration(ChildResource): """The network manager connectivity configuration resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -10814,7 +11047,7 @@ class ConnectivityConfiguration(ChildResource): # pylint: disable=too-many-inst :ivar applies_to_groups: Groups for configuration. :vartype applies_to_groups: list[~azure.mgmt.network.models.ConnectivityGroupItem] :ivar provisioning_state: The provisioning state of the connectivity configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar delete_existing_peering: Flag if need to remove current existing peerings. Known values are: "False" and "True". @@ -11307,7 +11540,7 @@ class ContainerNetworkInterface(SubResource): :vartype ip_configurations: list[~azure.mgmt.network.models.ContainerNetworkInterfaceIpConfiguration] :ivar provisioning_state: The provisioning state of the container network interface resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -11383,7 +11616,8 @@ class ContainerNetworkInterfaceConfiguration(SubResource): container network interface configuration. :vartype container_network_interfaces: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the container network interface - configuration resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + configuration resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", + "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -11445,7 +11679,8 @@ class ContainerNetworkInterfaceIpConfiguration(_serialization.Model): :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + configuration resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", + "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -11581,7 +11816,7 @@ def __init__(self, *, fqdn: Optional[str] = None, ip_addresses: Optional[List[st self.ip_addresses = ip_addresses -class CustomIpPrefix(Resource): # pylint: disable=too-many-instance-attributes +class CustomIpPrefix(Resource): """Custom IP prefix resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -11637,7 +11872,7 @@ class CustomIpPrefix(Resource): # pylint: disable=too-many-instance-attributes :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -11807,7 +12042,7 @@ class DdosCustomPolicy(Resource): subscriptions or resource groups. :vartype resource_guid: str :ivar provisioning_state: The provisioning state of the DDoS custom policy resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -11874,7 +12109,7 @@ class DdosProtectionPlan(_serialization.Model): across subscriptions or resource groups. :vartype resource_guid: str :ivar provisioning_state: The provisioning state of the DDoS protection plan resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar public_ip_addresses: The list of public IPs associated with the DDoS protection plan resource. This list is read-only. @@ -11994,7 +12229,7 @@ def __init__( self.ddos_protection_plan = ddos_protection_plan -class DefaultAdminRule(BaseAdminRule): # pylint: disable=too-many-instance-attributes +class DefaultAdminRule(BaseAdminRule): """Network default admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -12039,8 +12274,8 @@ class DefaultAdminRule(BaseAdminRule): # pylint: disable=too-many-instance-attr :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -12128,7 +12363,7 @@ class Delegation(SubResource): :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -12185,8 +12420,8 @@ class DelegationProperties(_serialization.Model): :ivar service_name: The service name to which the NVA is delegated. :vartype service_name: str - :ivar provisioning_state: The current provisioning state. Known values are: "Succeeded", - "Updating", "Deleting", and "Failed". + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -12368,7 +12603,7 @@ def __init__( self.require_proxy_for_network_rules = require_proxy_for_network_rules -class DscpConfiguration(Resource): # pylint: disable=too-many-instance-attributes +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. @@ -12407,7 +12642,7 @@ class DscpConfiguration(Resource): # pylint: disable=too-many-instance-attribut :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -12601,7 +12836,7 @@ def __init__( self.kind: Optional[str] = None -class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): # pylint: disable=too-many-instance-attributes +class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): """Network default admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -12647,8 +12882,8 @@ class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): # pyli :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -12859,7 +13094,7 @@ def __init__(self, *, value: Optional[List["_models.EffectiveNetworkSecurityGrou self.next_link = None -class EffectiveNetworkSecurityRule(_serialization.Model): # pylint: disable=too-many-instance-attributes +class EffectiveNetworkSecurityRule(_serialization.Model): """Effective network security rules. :ivar name: The name of the security rule specified by the user (if created by the user). @@ -13190,7 +13425,7 @@ def __init__( self.virtual_wan_resource_type = virtual_wan_resource_type -class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): # pylint: disable=too-many-instance-attributes +class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): """Network admin rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -13234,8 +13469,8 @@ class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): # pylint: dis :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -13830,7 +14065,7 @@ def __init__( self.pac_file = pac_file -class ExpressRouteCircuit(Resource): # pylint: disable=too-many-instance-attributes +class ExpressRouteCircuit(Resource): """ExpressRouteCircuit resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -13878,7 +14113,7 @@ class ExpressRouteCircuit(Resource): # pylint: disable=too-many-instance-attrib :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar gateway_manager_etag: The GatewayManager Etag. :vartype gateway_manager_etag: str @@ -14091,7 +14326,7 @@ class ExpressRouteCircuitAuthorization(SubResource): authorization. :vartype connection_resource_uri: str :ivar provisioning_state: The provisioning state of the authorization resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -14144,7 +14379,7 @@ def __init__( self.provisioning_state = None -class ExpressRouteCircuitConnection(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -14175,7 +14410,8 @@ class ExpressRouteCircuitConnection(SubResource): # pylint: disable=too-many-in "Connected", "Connecting", and "Disconnected". :vartype circuit_connection_status: str or ~azure.mgmt.network.models.CircuitConnectionStatus :ivar provisioning_state: The provisioning state of the express route circuit connection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -14319,7 +14555,7 @@ def __init__( self.next_link = next_link -class ExpressRouteCircuitPeering(SubResource): # pylint: disable=too-many-instance-attributes +class ExpressRouteCircuitPeering(SubResource): """Peering in an ExpressRouteCircuit resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -14359,7 +14595,7 @@ class ExpressRouteCircuitPeering(SubResource): # pylint: disable=too-many-insta :ivar stats: The peering stats of express route circuit. :vartype stats: ~azure.mgmt.network.models.ExpressRouteCircuitStats :ivar provisioning_state: The provisioning state of the express route circuit peering resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar gateway_manager_etag: The GatewayManager Etag. :vartype gateway_manager_etag: str @@ -14997,7 +15233,7 @@ class ExpressRouteConnection(SubResource): :ivar name: The name of the resource. Required. :vartype name: str :ivar provisioning_state: The provisioning state of the express route connection resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar express_route_circuit_peering: The ExpressRoute circuit peering. :vartype express_route_circuit_peering: ~azure.mgmt.network.models.ExpressRouteCircuitPeeringId @@ -15130,7 +15366,7 @@ def __init__(self, *, value: Optional[List["_models.ExpressRouteConnection"]] = self.value = value -class ExpressRouteCrossConnection(Resource): # pylint: disable=too-many-instance-attributes +class ExpressRouteCrossConnection(Resource): """ExpressRouteCrossConnection resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -15167,7 +15403,8 @@ class ExpressRouteCrossConnection(Resource): # pylint: disable=too-many-instanc :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar peerings: The list of peerings. :vartype peerings: list[~azure.mgmt.network.models.ExpressRouteCrossConnectionPeering] @@ -15279,7 +15516,7 @@ def __init__(self, *, value: Optional[List["_models.ExpressRouteCrossConnection" self.next_link = None -class ExpressRouteCrossConnectionPeering(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -15315,7 +15552,8 @@ class ExpressRouteCrossConnectionPeering(SubResource): # pylint: disable=too-ma :ivar microsoft_peering_config: The Microsoft peering configuration. :vartype microsoft_peering_config: ~azure.mgmt.network.models.ExpressRouteCircuitPeeringConfig :ivar provisioning_state: The provisioning state of the express route cross connection peering - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar gateway_manager_etag: The GatewayManager Etag. :vartype gateway_manager_etag: str @@ -15541,7 +15779,334 @@ def __init__( self.next_link = None -class ExpressRouteGateway(Resource): # pylint: disable=too-many-instance-attributes +class ExpressRouteFailoverCircuitResourceDetails(_serialization.Model): # pylint: disable=name-too-long + """ExpressRouteFailoverCircuitResourceDetails. + + :ivar nrp_resource_uri: NRP Resource URI of the circuit. + :vartype nrp_resource_uri: str + :ivar name: Circuit Name. + :vartype name: str + :ivar connection_name: Connection name associated with the circuit. + :vartype connection_name: str + """ + + _attribute_map = { + "nrp_resource_uri": {"key": "nrpResourceUri", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "connection_name": {"key": "connectionName", "type": "str"}, + } + + def __init__( + self, + *, + nrp_resource_uri: Optional[str] = None, + name: Optional[str] = None, + connection_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword nrp_resource_uri: NRP Resource URI of the circuit. + :paramtype nrp_resource_uri: str + :keyword name: Circuit Name. + :paramtype name: str + :keyword connection_name: Connection name associated with the circuit. + :paramtype connection_name: str + """ + super().__init__(**kwargs) + self.nrp_resource_uri = nrp_resource_uri + self.name = name + self.connection_name = connection_name + + +class ExpressRouteFailoverConnectionResourceDetails(_serialization.Model): # pylint: disable=name-too-long + """ExpressRouteFailoverConnectionResourceDetails. + + :ivar nrp_resource_uri: NRP Resource URI of the connection. + :vartype nrp_resource_uri: str + :ivar name: Connection Name. + :vartype name: str + :ivar status: The current status of the connection. Known values are: "Connected" and + "Disconnected". + :vartype status: str or ~azure.mgmt.network.models.FailoverConnectionStatus + :ivar last_updated_time: Time when the connection was last updated. + :vartype last_updated_time: str + """ + + _attribute_map = { + "nrp_resource_uri": {"key": "nrpResourceUri", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "last_updated_time": {"key": "lastUpdatedTime", "type": "str"}, + } + + def __init__( + self, + *, + nrp_resource_uri: Optional[str] = None, + name: Optional[str] = None, + status: Optional[Union[str, "_models.FailoverConnectionStatus"]] = None, + last_updated_time: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword nrp_resource_uri: NRP Resource URI of the connection. + :paramtype nrp_resource_uri: str + :keyword name: Connection Name. + :paramtype name: str + :keyword status: The current status of the connection. Known values are: "Connected" and + "Disconnected". + :paramtype status: str or ~azure.mgmt.network.models.FailoverConnectionStatus + :keyword last_updated_time: Time when the connection was last updated. + :paramtype last_updated_time: str + """ + super().__init__(**kwargs) + self.nrp_resource_uri = nrp_resource_uri + self.name = name + self.status = status + self.last_updated_time = last_updated_time + + +class ExpressRouteFailoverRedundantRoute(_serialization.Model): + """ExpressRouteFailoverRedundantRoute. + + :ivar peering_locations: A list of all the peering locations for the redundant routes. + :vartype peering_locations: list[str] + :ivar routes: A list of all the redundant routes in the peering locations. + :vartype routes: list[str] + """ + + _attribute_map = { + "peering_locations": {"key": "peeringLocations", "type": "[str]"}, + "routes": {"key": "routes", "type": "[str]"}, + } + + def __init__( + self, *, peering_locations: Optional[List[str]] = None, routes: Optional[List[str]] = None, **kwargs: Any + ) -> None: + """ + :keyword peering_locations: A list of all the peering locations for the redundant routes. + :paramtype peering_locations: list[str] + :keyword routes: A list of all the redundant routes in the peering locations. + :paramtype routes: list[str] + """ + super().__init__(**kwargs) + self.peering_locations = peering_locations + self.routes = routes + + +class ExpressRouteFailoverSingleTestDetails(_serialization.Model): + """ExpressRoute failover single test details. + + :ivar peering_location: Peering location of the test. + :vartype peering_location: str + :ivar status: The current status of the test. Known values are: "NotStarted", "Starting", + "Running", "StartFailed", "Stopping", "Completed", "StopFailed", "Invalid", and "Expired". + :vartype status: str or ~azure.mgmt.network.models.FailoverTestStatusForSingleTest + :ivar start_time_utc: Time when the test was started. + :vartype start_time_utc: str + :ivar end_time_utc: Time when the test was completed. + :vartype end_time_utc: str + :ivar redundant_routes: List of routes received from this peering as well as some other peering + location. + :vartype redundant_routes: list[~azure.mgmt.network.models.ExpressRouteFailoverRedundantRoute] + :ivar non_redundant_routes: List of al the routes that were received only from this peering + location. + :vartype non_redundant_routes: list[str] + :ivar was_simulation_successful: Whether the failover simulation was successful or not. + :vartype was_simulation_successful: bool + :ivar failover_connection_details: List of all the failover connections for this peering + location. + :vartype failover_connection_details: + list[~azure.mgmt.network.models.FailoverConnectionDetails] + """ + + _attribute_map = { + "peering_location": {"key": "peeringLocation", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "start_time_utc": {"key": "startTimeUtc", "type": "str"}, + "end_time_utc": {"key": "endTimeUtc", "type": "str"}, + "redundant_routes": {"key": "redundantRoutes", "type": "[ExpressRouteFailoverRedundantRoute]"}, + "non_redundant_routes": {"key": "nonRedundantRoutes", "type": "[str]"}, + "was_simulation_successful": {"key": "wasSimulationSuccessful", "type": "bool"}, + "failover_connection_details": {"key": "failoverConnectionDetails", "type": "[FailoverConnectionDetails]"}, + } + + def __init__( + self, + *, + peering_location: Optional[str] = None, + status: Optional[Union[str, "_models.FailoverTestStatusForSingleTest"]] = None, + start_time_utc: Optional[str] = None, + end_time_utc: Optional[str] = None, + redundant_routes: Optional[List["_models.ExpressRouteFailoverRedundantRoute"]] = None, + non_redundant_routes: Optional[List[str]] = None, + was_simulation_successful: Optional[bool] = None, + failover_connection_details: Optional[List["_models.FailoverConnectionDetails"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword peering_location: Peering location of the test. + :paramtype peering_location: str + :keyword status: The current status of the test. Known values are: "NotStarted", "Starting", + "Running", "StartFailed", "Stopping", "Completed", "StopFailed", "Invalid", and "Expired". + :paramtype status: str or ~azure.mgmt.network.models.FailoverTestStatusForSingleTest + :keyword start_time_utc: Time when the test was started. + :paramtype start_time_utc: str + :keyword end_time_utc: Time when the test was completed. + :paramtype end_time_utc: str + :keyword redundant_routes: List of routes received from this peering as well as some other + peering location. + :paramtype redundant_routes: + list[~azure.mgmt.network.models.ExpressRouteFailoverRedundantRoute] + :keyword non_redundant_routes: List of al the routes that were received only from this peering + location. + :paramtype non_redundant_routes: list[str] + :keyword was_simulation_successful: Whether the failover simulation was successful or not. + :paramtype was_simulation_successful: bool + :keyword failover_connection_details: List of all the failover connections for this peering + location. + :paramtype failover_connection_details: + list[~azure.mgmt.network.models.FailoverConnectionDetails] + """ + super().__init__(**kwargs) + self.peering_location = peering_location + self.status = status + self.start_time_utc = start_time_utc + self.end_time_utc = end_time_utc + self.redundant_routes = redundant_routes + self.non_redundant_routes = non_redundant_routes + self.was_simulation_successful = was_simulation_successful + self.failover_connection_details = failover_connection_details + + +class ExpressRouteFailoverStopApiParameters(_serialization.Model): + """Start packet capture parameters on virtual network gateway. + + :ivar peering_location: Peering location of the test. + :vartype peering_location: str + :ivar was_simulation_successful: Whether the failover simulation was successful or not. + :vartype was_simulation_successful: bool + :ivar details: List of all the failover connections for this peering location. + :vartype details: list[~azure.mgmt.network.models.FailoverConnectionDetails] + """ + + _attribute_map = { + "peering_location": {"key": "peeringLocation", "type": "str"}, + "was_simulation_successful": {"key": "wasSimulationSuccessful", "type": "bool"}, + "details": {"key": "details", "type": "[FailoverConnectionDetails]"}, + } + + def __init__( + self, + *, + peering_location: Optional[str] = None, + was_simulation_successful: Optional[bool] = None, + details: Optional[List["_models.FailoverConnectionDetails"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword peering_location: Peering location of the test. + :paramtype peering_location: str + :keyword was_simulation_successful: Whether the failover simulation was successful or not. + :paramtype was_simulation_successful: bool + :keyword details: List of all the failover connections for this peering location. + :paramtype details: list[~azure.mgmt.network.models.FailoverConnectionDetails] + """ + super().__init__(**kwargs) + self.peering_location = peering_location + self.was_simulation_successful = was_simulation_successful + self.details = details + + +class ExpressRouteFailoverTestDetails(_serialization.Model): + """ExpressRoute failover test details. + + :ivar peering_location: Peering location of the test. + :vartype peering_location: str + :ivar circuits: All circuits in the peering location. + :vartype circuits: list[~azure.mgmt.network.models.ExpressRouteFailoverCircuitResourceDetails] + :ivar status: The current status of the test. Known values are: "NotStarted", "Starting", + "Running", "StartFailed", "Stopping", "Completed", "StopFailed", "Invalid", and "Expired". + :vartype status: str or ~azure.mgmt.network.models.FailoverTestStatus + :ivar start_time: Time when the test was started. + :vartype start_time: str + :ivar end_time: Time when the test was completed. + :vartype end_time: str + :ivar connections: All connections to the circuits in the peering location. + :vartype connections: + list[~azure.mgmt.network.models.ExpressRouteFailoverConnectionResourceDetails] + :ivar test_guid: The unique GUID associated with the test. + :vartype test_guid: str + :ivar test_type: The type of failover test. Known values are: "SingleSiteFailover", + "MultiSiteFailover", and "All". + :vartype test_type: str or ~azure.mgmt.network.models.FailoverTestType + :ivar issues: A list of all issues with the test. + :vartype issues: list[str] + """ + + _attribute_map = { + "peering_location": {"key": "peeringLocation", "type": "str"}, + "circuits": {"key": "circuits", "type": "[ExpressRouteFailoverCircuitResourceDetails]"}, + "status": {"key": "status", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "end_time": {"key": "endTime", "type": "str"}, + "connections": {"key": "connections", "type": "[ExpressRouteFailoverConnectionResourceDetails]"}, + "test_guid": {"key": "testGuid", "type": "str"}, + "test_type": {"key": "testType", "type": "str"}, + "issues": {"key": "issues", "type": "[str]"}, + } + + def __init__( + self, + *, + peering_location: Optional[str] = None, + circuits: Optional[List["_models.ExpressRouteFailoverCircuitResourceDetails"]] = None, + status: Optional[Union[str, "_models.FailoverTestStatus"]] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + connections: Optional[List["_models.ExpressRouteFailoverConnectionResourceDetails"]] = None, + test_guid: Optional[str] = None, + test_type: Optional[Union[str, "_models.FailoverTestType"]] = None, + issues: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword peering_location: Peering location of the test. + :paramtype peering_location: str + :keyword circuits: All circuits in the peering location. + :paramtype circuits: + list[~azure.mgmt.network.models.ExpressRouteFailoverCircuitResourceDetails] + :keyword status: The current status of the test. Known values are: "NotStarted", "Starting", + "Running", "StartFailed", "Stopping", "Completed", "StopFailed", "Invalid", and "Expired". + :paramtype status: str or ~azure.mgmt.network.models.FailoverTestStatus + :keyword start_time: Time when the test was started. + :paramtype start_time: str + :keyword end_time: Time when the test was completed. + :paramtype end_time: str + :keyword connections: All connections to the circuits in the peering location. + :paramtype connections: + list[~azure.mgmt.network.models.ExpressRouteFailoverConnectionResourceDetails] + :keyword test_guid: The unique GUID associated with the test. + :paramtype test_guid: str + :keyword test_type: The type of failover test. Known values are: "SingleSiteFailover", + "MultiSiteFailover", and "All". + :paramtype test_type: str or ~azure.mgmt.network.models.FailoverTestType + :keyword issues: A list of all issues with the test. + :paramtype issues: list[str] + """ + super().__init__(**kwargs) + self.peering_location = peering_location + self.circuits = circuits + self.status = status + self.start_time = start_time + self.end_time = end_time + self.connections = connections + self.test_guid = test_guid + self.test_type = test_type + self.issues = issues + + +class ExpressRouteGateway(Resource): """ExpressRoute gateway resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -15564,7 +16129,7 @@ class ExpressRouteGateway(Resource): # pylint: disable=too-many-instance-attrib :ivar express_route_connections: List of ExpressRoute connections to the ExpressRoute gateway. :vartype express_route_connections: list[~azure.mgmt.network.models.ExpressRouteConnection] :ivar provisioning_state: The provisioning state of the express route gateway resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar virtual_hub: The Virtual Hub where the ExpressRoute gateway is or will be deployed. :vartype virtual_hub: ~azure.mgmt.network.models.VirtualHubId @@ -15716,7 +16281,7 @@ def __init__( self.max = max -class ExpressRouteLink(SubResource): # pylint: disable=too-many-instance-attributes +class ExpressRouteLink(SubResource): """ExpressRouteLink child resource definition. Variables are only populated by the server, and will be ignored when sending a request. @@ -15744,7 +16309,7 @@ class ExpressRouteLink(SubResource): # pylint: disable=too-many-instance-attrib "Disabled". :vartype admin_state: str or ~azure.mgmt.network.models.ExpressRouteLinkAdminState :ivar provisioning_state: The provisioning state of the express route link resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar mac_sec_config: MacSec configuration. :vartype mac_sec_config: ~azure.mgmt.network.models.ExpressRouteLinkMacSecConfig @@ -15891,7 +16456,7 @@ def __init__( self.sci_state = sci_state -class ExpressRoutePort(Resource): # pylint: disable=too-many-instance-attributes +class ExpressRoutePort(Resource): """ExpressRoutePort resource definition. Variables are only populated by the server, and will be ignored when sending a request. @@ -15933,7 +16498,7 @@ class ExpressRoutePort(Resource): # pylint: disable=too-many-instance-attribute ExpressRoutePort resource. :vartype circuits: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the express route port resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: The resource GUID property of the express route port resource. :vartype resource_guid: str @@ -16055,7 +16620,7 @@ class ExpressRoutePortAuthorization(SubResource): authorization. :vartype circuit_resource_uri: str :ivar provisioning_state: The provisioning state of the authorization resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -16190,7 +16755,7 @@ class ExpressRoutePortsLocation(Resource): :vartype available_bandwidths: list[~azure.mgmt.network.models.ExpressRoutePortsLocationBandwidths] :ivar provisioning_state: The provisioning state of the express route port location resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -16304,7 +16869,7 @@ def __init__( self.next_link = next_link -class ExpressRouteProviderPort(Resource): # pylint: disable=too-many-instance-attributes +class ExpressRouteProviderPort(Resource): """ExpressRouteProviderPort resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -16459,7 +17024,8 @@ class ExpressRouteServiceProvider(Resource): :vartype bandwidths_offered: list[~azure.mgmt.network.models.ExpressRouteServiceProviderBandwidthsOffered] :ivar provisioning_state: The provisioning state of the express route service provider - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -16602,6 +17168,47 @@ def __init__( self.type = type +class FailoverConnectionDetails(_serialization.Model): + """FailoverConnectionDetails. + + :ivar failover_connection_name: Name of the failover connection. + :vartype failover_connection_name: str + :ivar failover_location: Location of the failover connection. + :vartype failover_location: str + :ivar is_verified: Whether the customer was able to establish connectivity through this + failover connection or not. + :vartype is_verified: bool + """ + + _attribute_map = { + "failover_connection_name": {"key": "failoverConnectionName", "type": "str"}, + "failover_location": {"key": "failoverLocation", "type": "str"}, + "is_verified": {"key": "isVerified", "type": "bool"}, + } + + def __init__( + self, + *, + failover_connection_name: Optional[str] = None, + failover_location: Optional[str] = None, + is_verified: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword failover_connection_name: Name of the failover connection. + :paramtype failover_connection_name: str + :keyword failover_location: Location of the failover connection. + :paramtype failover_location: str + :keyword is_verified: Whether the customer was able to establish connectivity through this + failover connection or not. + :paramtype is_verified: bool + """ + super().__init__(**kwargs) + self.failover_connection_name = failover_connection_name + self.failover_location = failover_location + self.is_verified = is_verified + + class FilterItems(_serialization.Model): """Will contain the filter name and values to operate on. @@ -16702,7 +17309,7 @@ def __init__( self.filters = filters -class FirewallPolicy(Resource): # pylint: disable=too-many-instance-attributes +class FirewallPolicy(Resource): """FirewallPolicy Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -16727,7 +17334,7 @@ class FirewallPolicy(Resource): # pylint: disable=too-many-instance-attributes :ivar rule_collection_groups: List of references to FirewallPolicyRuleCollectionGroups. :vartype rule_collection_groups: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the firewall policy resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar base_policy: The parent firewall policy from which rules are inherited. :vartype base_policy: ~azure.mgmt.network.models.SubResource @@ -16902,7 +17509,7 @@ def __init__(self, *, key_vault_secret_id: Optional[str] = None, name: Optional[ self.name = name -class FirewallPolicyDraft(Resource): # pylint: disable=too-many-instance-attributes +class FirewallPolicyDraft(Resource): """FirewallPolicy Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -17660,7 +18267,8 @@ class FirewallPolicyRuleCollectionGroup(SubResource): :ivar rule_collections: Group of Firewall Policy rule collections. :vartype rule_collections: list[~azure.mgmt.network.models.FirewallPolicyRuleCollection] :ivar provisioning_state: The provisioning state of the firewall policy rule collection group - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -17937,7 +18545,7 @@ def __init__( self.certificate_authority = certificate_authority -class FlowLog(Resource): # pylint: disable=too-many-instance-attributes +class FlowLog(Resource): """A flow log resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -17975,8 +18583,8 @@ class FlowLog(Resource): # pylint: disable=too-many-instance-attributes :ivar flow_analytics_configuration: Parameters that define the configuration of traffic analytics. :vartype flow_analytics_configuration: ~azure.mgmt.network.models.TrafficAnalyticsProperties - :ivar provisioning_state: The provisioning state of the flow log. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the flow log. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -18243,7 +18851,7 @@ def __init__(self, *, target_resource_id: str, **kwargs: Any) -> None: self.target_resource_id = target_resource_id -class FrontendIPConfiguration(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -18286,7 +18894,7 @@ class FrontendIPConfiguration(SubResource): # pylint: disable=too-many-instance :ivar gateway_load_balancer: The reference to gateway load balancer frontend IP. :vartype gateway_load_balancer: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -18990,7 +19598,7 @@ class HubIpConfiguration(SubResource): :ivar public_ip_address: The reference to the public IP resource. :vartype public_ip_address: ~azure.mgmt.network.models.PublicIPAddress :ivar provisioning_state: The provisioning state of the IP configuration resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19171,7 +19779,7 @@ class HubRouteTable(SubResource): :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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19252,7 +19860,8 @@ class HubVirtualNetworkConnection(SubResource): route tables on this connection. :vartype routing_configuration: ~azure.mgmt.network.models.RoutingConfiguration :ivar provisioning_state: The provisioning state of the hub virtual network connection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19376,7 +19985,7 @@ def __init__( self.skip = skip -class InboundNatPool(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -19419,7 +20028,7 @@ class InboundNatPool(SubResource): # pylint: disable=too-many-instance-attribut 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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19510,7 +20119,7 @@ def __init__( self.provisioning_state = None -class InboundNatRule(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -19564,7 +20173,7 @@ class InboundNatRule(SubResource): # pylint: disable=too-many-instance-attribut :ivar backend_address_pool: A reference to backendAddressPool resource. :vartype backend_address_pool: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the inbound NAT rule resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19762,8 +20371,8 @@ class InboundSecurityRule(SubResource): :vartype rule_type: str or ~azure.mgmt.network.models.InboundSecurityRuleType :ivar rules: List of allowed rules. :vartype rules: list[~azure.mgmt.network.models.InboundSecurityRules] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -19884,6 +20493,60 @@ def __init__( self.applies_on = applies_on +class IntentContent(_serialization.Model): + """Intent information. + + All required parameters must be populated in order to send to server. + + :ivar description: + :vartype description: str + :ivar source_resource_id: Source resource id of the intent. Required. + :vartype source_resource_id: str + :ivar destination_resource_id: Destination resource id of the intent. Required. + :vartype destination_resource_id: str + :ivar ip_traffic: IP traffic information. Required. + :vartype ip_traffic: ~azure.mgmt.network.models.IPTraffic + """ + + _validation = { + "source_resource_id": {"required": True}, + "destination_resource_id": {"required": True}, + "ip_traffic": {"required": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "source_resource_id": {"key": "sourceResourceId", "type": "str"}, + "destination_resource_id": {"key": "destinationResourceId", "type": "str"}, + "ip_traffic": {"key": "ipTraffic", "type": "IPTraffic"}, + } + + def __init__( + self, + *, + source_resource_id: str, + destination_resource_id: str, + ip_traffic: "_models.IPTraffic", + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: + :paramtype description: str + :keyword source_resource_id: Source resource id of the intent. Required. + :paramtype source_resource_id: str + :keyword destination_resource_id: Destination resource id of the intent. Required. + :paramtype destination_resource_id: str + :keyword ip_traffic: IP traffic information. Required. + :paramtype ip_traffic: ~azure.mgmt.network.models.IPTraffic + """ + super().__init__(**kwargs) + self.description = description + self.source_resource_id = source_resource_id + self.destination_resource_id = destination_resource_id + self.ip_traffic = ip_traffic + + class InternetIngressPublicIpsProperties(_serialization.Model): """Resource Uri of Public Ip for Standard Load Balancer Frontend End. @@ -19945,7 +20608,7 @@ def __init__( self.is_platform_reserved = is_platform_reserved -class IpAllocation(Resource): # pylint: disable=too-many-instance-attributes +class IpAllocation(Resource): """IpAllocation resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -20083,6 +20746,272 @@ def __init__( self.next_link = next_link +class IpamPool(CommonTrackedResource): + """Instance of Pool 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 server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of IpamPool resource properties which are specific to the Pool + resource. Required. + :vartype properties: ~azure.mgmt.network.models.IpamPoolProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "IpamPoolProperties"}, + } + + def __init__( + self, + *, + location: str, + properties: "_models.IpamPoolProperties", + tags: Optional[Dict[str, str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword properties: Properties of IpamPool resource properties which are specific to the Pool + resource. Required. + :paramtype properties: ~azure.mgmt.network.models.IpamPoolProperties + """ + super().__init__(tags=tags, location=location, **kwargs) + self.properties = properties + + +class IpamPoolList(_serialization.Model): + """List of IpamPool. + + :ivar value: + :vartype value: list[~azure.mgmt.network.models.IpamPool] + :ivar next_link: The link used to get the next page of operations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[IpamPool]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.IpamPool"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: + :paramtype value: list[~azure.mgmt.network.models.IpamPool] + :keyword next_link: The link used to get the next page of operations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IpamPoolPrefixAllocation(_serialization.Model): + """IpamPool prefix allocation reference. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar number_of_ip_addresses: Number of IP addresses to allocate. + :vartype number_of_ip_addresses: str + :ivar allocated_address_prefixes: List of assigned IP address prefixes in the IpamPool of the + associated resource. + :vartype allocated_address_prefixes: list[str] + :ivar id: Resource id of the associated Azure IpamPool resource. + :vartype id: str + """ + + _validation = { + "allocated_address_prefixes": {"readonly": True}, + } + + _attribute_map = { + "number_of_ip_addresses": {"key": "numberOfIpAddresses", "type": "str"}, + "allocated_address_prefixes": {"key": "allocatedAddressPrefixes", "type": "[str]"}, + "id": {"key": "pool.id", "type": "str"}, + } + + def __init__( + self, + *, + number_of_ip_addresses: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + **kwargs: Any + ) -> None: + """ + :keyword number_of_ip_addresses: Number of IP addresses to allocate. + :paramtype number_of_ip_addresses: str + :keyword id: Resource id of the associated Azure IpamPool resource. + :paramtype id: str + """ + super().__init__(**kwargs) + self.number_of_ip_addresses = number_of_ip_addresses + self.allocated_address_prefixes = None + self.id = id + + +class IpamPoolProperties(_serialization.Model): + """Properties of IpamPool resource properties which are specific to the Pool 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 server. + + :ivar description: + :vartype description: str + :ivar display_name: String representing a friendly name for the resource. + :vartype display_name: str + :ivar ip_address_type: List of IP address type for the IpamPool. + :vartype ip_address_type: list[str or ~azure.mgmt.network.models.IpType] + :ivar parent_pool_name: String representing parent IpamPool resource name. If empty the + IpamPool will be a root pool. + :vartype parent_pool_name: str + :ivar address_prefixes: List of IP address prefixes of the resource. Required. + :vartype address_prefixes: list[str] + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + + _validation = { + "ip_address_type": {"readonly": True}, + "address_prefixes": {"required": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "ip_address_type": {"key": "ipAddressType", "type": "[str]"}, + "parent_pool_name": {"key": "parentPoolName", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + address_prefixes: List[str], + description: Optional[str] = None, + display_name: Optional[str] = None, + parent_pool_name: Optional[str] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: + :paramtype description: str + :keyword display_name: String representing a friendly name for the resource. + :paramtype display_name: str + :keyword parent_pool_name: String representing parent IpamPool resource name. If empty the + IpamPool will be a root pool. + :paramtype parent_pool_name: str + :keyword address_prefixes: List of IP address prefixes of the resource. Required. + :paramtype address_prefixes: list[str] + :keyword provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :paramtype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + super().__init__(**kwargs) + self.description = description + self.display_name = display_name + self.ip_address_type = None + self.parent_pool_name = parent_pool_name + self.address_prefixes = address_prefixes + self.provisioning_state = provisioning_state + + +class IpamPoolUpdate(_serialization.Model): + """Represents the IpamPool update API request interface. + + :ivar tags: Dictionary of :code:``. + :vartype tags: dict[str, str] + :ivar properties: Represents the IpamPool update properties. + :vartype properties: ~azure.mgmt.network.models.IpamPoolUpdateProperties + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "properties": {"key": "properties", "type": "IpamPoolUpdateProperties"}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.IpamPoolUpdateProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Dictionary of :code:``. + :paramtype tags: dict[str, str] + :keyword properties: Represents the IpamPool update properties. + :paramtype properties: ~azure.mgmt.network.models.IpamPoolUpdateProperties + """ + super().__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class IpamPoolUpdateProperties(_serialization.Model): + """Represents the IpamPool update properties. + + :ivar description: + :vartype description: str + :ivar display_name: String representing a friendly name for the resource. + :vartype display_name: str + """ + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + } + + def __init__(self, *, description: Optional[str] = None, display_name: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword description: + :paramtype description: str + :keyword display_name: String representing a friendly name for the resource. + :paramtype display_name: str + """ + super().__init__(**kwargs) + self.description = description + self.display_name = display_name + + class IPConfiguration(SubResource): """IP configuration. @@ -20105,7 +21034,7 @@ class IPConfiguration(SubResource): :ivar public_ip_address: The reference to the public IP resource. :vartype public_ip_address: ~azure.mgmt.network.models.PublicIPAddress :ivar provisioning_state: The provisioning state of the IP configuration resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -20230,7 +21159,7 @@ class IPConfigurationProfile(SubResource): configuration. :vartype subnet: ~azure.mgmt.network.models.Subnet :ivar provisioning_state: The provisioning state of the IP configuration profile resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -20292,7 +21221,7 @@ class IpGroup(Resource): :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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar ip_addresses: IpAddresses/IpAddressPrefixes in the IpGroups resource. :vartype ip_addresses: list[str] @@ -20556,6 +21485,69 @@ def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = No self.tag = tag +class IPTraffic(_serialization.Model): + """IP traffic information. + + All required parameters must be populated in order to send to server. + + :ivar source_ips: List of source IP addresses of the traffic.. Required. + :vartype source_ips: list[str] + :ivar destination_ips: List of destination IP addresses of the traffic.. Required. + :vartype destination_ips: list[str] + :ivar source_ports: The source ports of the traffic. Required. + :vartype source_ports: list[str] + :ivar destination_ports: The destination ports of the traffic. Required. + :vartype destination_ports: list[str] + :ivar protocols: Required. + :vartype protocols: list[str or ~azure.mgmt.network.models.NetworkProtocol] + """ + + _validation = { + "source_ips": {"required": True}, + "destination_ips": {"required": True}, + "source_ports": {"required": True}, + "destination_ports": {"required": True}, + "protocols": {"required": True}, + } + + _attribute_map = { + "source_ips": {"key": "sourceIps", "type": "[str]"}, + "destination_ips": {"key": "destinationIps", "type": "[str]"}, + "source_ports": {"key": "sourcePorts", "type": "[str]"}, + "destination_ports": {"key": "destinationPorts", "type": "[str]"}, + "protocols": {"key": "protocols", "type": "[str]"}, + } + + def __init__( + self, + *, + source_ips: List[str], + destination_ips: List[str], + source_ports: List[str], + destination_ports: List[str], + protocols: List[Union[str, "_models.NetworkProtocol"]], + **kwargs: Any + ) -> None: + """ + :keyword source_ips: List of source IP addresses of the traffic.. Required. + :paramtype source_ips: list[str] + :keyword destination_ips: List of destination IP addresses of the traffic.. Required. + :paramtype destination_ips: list[str] + :keyword source_ports: The source ports of the traffic. Required. + :paramtype source_ports: list[str] + :keyword destination_ports: The destination ports of the traffic. Required. + :paramtype destination_ports: list[str] + :keyword protocols: Required. + :paramtype protocols: list[str or ~azure.mgmt.network.models.NetworkProtocol] + """ + super().__init__(**kwargs) + self.source_ips = source_ips + self.destination_ips = destination_ips + self.source_ports = source_ports + self.destination_ports = destination_ports + self.protocols = protocols + + class Ipv6CircuitConnectionConfig(_serialization.Model): """IPv6 Circuit Connection properties for global reach. @@ -21218,7 +22210,7 @@ def __init__( self.next_link = next_link -class LoadBalancer(Resource): # pylint: disable=too-many-instance-attributes +class LoadBalancer(Resource): """LoadBalancer resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -21268,7 +22260,7 @@ class LoadBalancer(Resource): # pylint: disable=too-many-instance-attributes :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -21524,6 +22516,107 @@ def __init__(self, *, value: Optional[List["_models.FrontendIPConfiguration"]] = self.next_link = None +class LoadBalancerHealthPerRule(_serialization.Model): + """The response for a Health API. + + :ivar up: Number of backend instances associated to the LB rule that are considered healthy. + :vartype up: int + :ivar down: Number of backend instances associated to the LB rule that are considered + unhealthy. + :vartype down: int + :ivar load_balancer_backend_addresses: Information about the health per rule of the backend + addresses. + :vartype load_balancer_backend_addresses: + list[~azure.mgmt.network.models.LoadBalancerHealthPerRulePerBackendAddress] + """ + + _attribute_map = { + "up": {"key": "up", "type": "int"}, + "down": {"key": "down", "type": "int"}, + "load_balancer_backend_addresses": { + "key": "loadBalancerBackendAddresses", + "type": "[LoadBalancerHealthPerRulePerBackendAddress]", + }, + } + + def __init__( + self, + *, + up: Optional[int] = None, + down: Optional[int] = None, + load_balancer_backend_addresses: Optional[List["_models.LoadBalancerHealthPerRulePerBackendAddress"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword up: Number of backend instances associated to the LB rule that are considered healthy. + :paramtype up: int + :keyword down: Number of backend instances associated to the LB rule that are considered + unhealthy. + :paramtype down: int + :keyword load_balancer_backend_addresses: Information about the health per rule of the backend + addresses. + :paramtype load_balancer_backend_addresses: + list[~azure.mgmt.network.models.LoadBalancerHealthPerRulePerBackendAddress] + """ + super().__init__(**kwargs) + self.up = up + self.down = down + self.load_balancer_backend_addresses = load_balancer_backend_addresses + + +class LoadBalancerHealthPerRulePerBackendAddress(_serialization.Model): # pylint: disable=name-too-long + """The information about health per rule per backend address. + + :ivar ip_address: The IP address belonging to the backend address. + :vartype ip_address: str + :ivar network_interface_ip_configuration_id: The id of the network interface ip configuration + belonging to the backend address. + :vartype network_interface_ip_configuration_id: + ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration + :ivar state: The current health of the backend instances that is associated to the LB rule. + :vartype state: str + :ivar reason: The explanation of the State. + :vartype reason: str + """ + + _attribute_map = { + "ip_address": {"key": "ipAddress", "type": "str"}, + "network_interface_ip_configuration_id": { + "key": "networkInterfaceIPConfigurationId", + "type": "NetworkInterfaceIPConfiguration", + }, + "state": {"key": "state", "type": "str"}, + "reason": {"key": "reason", "type": "str"}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + network_interface_ip_configuration_id: Optional["_models.NetworkInterfaceIPConfiguration"] = None, + state: Optional[str] = None, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword ip_address: The IP address belonging to the backend address. + :paramtype ip_address: str + :keyword network_interface_ip_configuration_id: The id of the network interface ip + configuration belonging to the backend address. + :paramtype network_interface_ip_configuration_id: + ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration + :keyword state: The current health of the backend instances that is associated to the LB rule. + :paramtype state: str + :keyword reason: The explanation of the State. + :paramtype reason: str + """ + super().__init__(**kwargs) + self.ip_address = ip_address + self.network_interface_ip_configuration_id = network_interface_ip_configuration_id + self.state = state + self.reason = reason + + class LoadBalancerListResult(_serialization.Model): """Response for ListLoadBalancers API service call. @@ -21742,7 +22835,7 @@ def __init__( self.public_ip_address = public_ip_address -class LoadBalancingRule(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -21794,7 +22887,7 @@ class LoadBalancingRule(SubResource): # pylint: disable=too-many-instance-attri 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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -21906,7 +22999,7 @@ def __init__( self.provisioning_state = None -class LocalNetworkGateway(Resource): # pylint: disable=too-many-instance-attributes +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. @@ -21934,7 +23027,7 @@ class LocalNetworkGateway(Resource): # pylint: disable=too-many-instance-attrib :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -22456,7 +23549,7 @@ def __init__( self.selector = selector -class MetricSpecification(_serialization.Model): # pylint: disable=too-many-instance-attributes +class MetricSpecification(_serialization.Model): """Description of metrics specification. :ivar name: The name of the metric. @@ -22612,7 +23705,7 @@ def __init__(self, *, pools: Optional[List[str]] = None, **kwargs: Any) -> None: self.pools = pools -class NatGateway(Resource): # pylint: disable=too-many-instance-attributes +class NatGateway(Resource): """Nat Gateway resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -22647,7 +23740,7 @@ class NatGateway(Resource): # pylint: disable=too-many-instance-attributes :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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -22771,7 +23864,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.NatGatewaySkuName"]] = self.name = name -class NatRule(FirewallPolicyRule): # pylint: disable=too-many-instance-attributes +class NatRule(FirewallPolicyRule): """Rule of type nat. All required parameters must be populated in order to send to server. @@ -23105,7 +24198,7 @@ class NetworkGroup(ChildResource): "Subnet". :vartype member_type: str or ~azure.mgmt.network.models.GroupMemberType :ivar provisioning_state: The provisioning state of the scope assignment resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -23272,7 +24365,7 @@ def __init__( self.source_network_intent_policy = source_network_intent_policy -class NetworkInterface(Resource): # pylint: disable=too-many-instance-attributes +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. @@ -23311,6 +24404,9 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute :ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports encryption. :vartype vnet_encryption_supported: bool + :ivar default_outbound_connectivity_enabled: Whether default outbound connectivity for nic was + configured or not. + :vartype default_outbound_connectivity_enabled: bool :ivar enable_accelerated_networking: If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. :vartype enable_accelerated_networking: bool @@ -23327,7 +24423,7 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar workload_type: WorkloadType of the NetworkInterface for BareMetal resources. :vartype workload_type: str @@ -23356,6 +24452,7 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute "mac_address": {"readonly": True}, "primary": {"readonly": True}, "vnet_encryption_supported": {"readonly": True}, + "default_outbound_connectivity_enabled": {"readonly": True}, "hosted_workloads": {"readonly": True}, "dscp_configuration": {"readonly": True}, "resource_guid": {"readonly": True}, @@ -23379,6 +24476,10 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute "mac_address": {"key": "properties.macAddress", "type": "str"}, "primary": {"key": "properties.primary", "type": "bool"}, "vnet_encryption_supported": {"key": "properties.vnetEncryptionSupported", "type": "bool"}, + "default_outbound_connectivity_enabled": { + "key": "properties.defaultOutboundConnectivityEnabled", + "type": "bool", + }, "enable_accelerated_networking": {"key": "properties.enableAcceleratedNetworking", "type": "bool"}, "disable_tcp_state_tracking": {"key": "properties.disableTcpStateTracking", "type": "bool"}, "enable_ip_forwarding": {"key": "properties.enableIPForwarding", "type": "bool"}, @@ -23467,6 +24568,7 @@ def __init__( # pylint: disable=too-many-locals self.mac_address = None self.primary = None self.vnet_encryption_supported = None + self.default_outbound_connectivity_enabled = None self.enable_accelerated_networking = enable_accelerated_networking self.disable_tcp_state_tracking = disable_tcp_state_tracking self.enable_ip_forwarding = enable_ip_forwarding @@ -23571,7 +24673,7 @@ def __init__( self.internal_domain_name_suffix = None -class NetworkInterfaceIPConfiguration(SubResource): # pylint: disable=too-many-instance-attributes +class NetworkInterfaceIPConfiguration(SubResource): """IPConfiguration in a network interface. Variables are only populated by the server, and will be ignored when sending a request. @@ -23622,7 +24724,7 @@ class NetworkInterfaceIPConfiguration(SubResource): # pylint: disable=too-many- included. :vartype application_security_groups: list[~azure.mgmt.network.models.ApplicationSecurityGroup] :ivar provisioning_state: The provisioning state of the network interface IP configuration. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_link_connection_properties: PrivateLinkConnection properties for the network interface. @@ -23908,7 +25010,8 @@ class NetworkInterfaceTapConfiguration(SubResource): :ivar virtual_network_tap: The reference to the Virtual Network Tap resource. :vartype virtual_network_tap: ~azure.mgmt.network.models.VirtualNetworkTap :ivar provisioning_state: The provisioning state of the network interface tap configuration - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -23984,7 +25087,7 @@ def __init__( self.next_link = None -class NetworkManager(Resource): # pylint: disable=too-many-instance-attributes +class NetworkManager(Resource): """The Managed Network resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -24012,7 +25115,7 @@ class NetworkManager(Resource): # pylint: disable=too-many-instance-attributes :vartype network_manager_scope_accesses: list[str or ~azure.mgmt.network.models.ConfigurationType] :ivar provisioning_state: The provisioning state of the network manager resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -24522,8 +25625,8 @@ class NetworkManagerRoutingConfiguration(ChildResource): :vartype system_data: ~azure.mgmt.network.models.SystemData :ivar description: A description of the routing configuration. :vartype description: str - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -24673,7 +25776,7 @@ class NetworkProfile(Resource): :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -24856,7 +25959,7 @@ def __init__( self.destination_fqdns = destination_fqdns -class NetworkSecurityGroup(Resource): # pylint: disable=too-many-instance-attributes +class NetworkSecurityGroup(Resource): """NetworkSecurityGroup resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -24889,7 +25992,7 @@ class NetworkSecurityGroup(Resource): # pylint: disable=too-many-instance-attri :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -25087,7 +26190,7 @@ def __init__( self.destination_port_matched = destination_port_matched -class NetworkVirtualAppliance(Resource): # pylint: disable=too-many-instance-attributes +class NetworkVirtualAppliance(Resource): """NetworkVirtualAppliance Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -25141,8 +26244,8 @@ class NetworkVirtualAppliance(Resource): # pylint: disable=too-many-instance-at :vartype virtual_appliance_connections: list[~azure.mgmt.network.models.SubResource] :ivar inbound_security_rules: List of references to InboundSecurityRules. :vartype inbound_security_rules: list[~azure.mgmt.network.models.SubResource] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar deployment_type: The deployment type. PartnerManaged for the SaaS NVA. :vartype deployment_type: str @@ -25301,7 +26404,8 @@ class NetworkVirtualApplianceConnection(SubResource): :ivar name_properties_name: The name of the resource. :vartype name_properties_name: str :ivar provisioning_state: The provisioning state of the NetworkVirtualApplianceConnection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar asn: Network Virtual Appliance ASN. :vartype asn: int @@ -25684,7 +26788,7 @@ class NetworkWatcher(Resource): :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -26124,7 +27228,7 @@ def __init__( self.order = order -class OutboundRule(SubResource): # pylint: disable=too-many-instance-attributes +class OutboundRule(SubResource): """Outbound rule of the load balancer. Variables are only populated by the server, and will be ignored when sending a request. @@ -26146,7 +27250,7 @@ class OutboundRule(SubResource): # pylint: disable=too-many-instance-attributes balanced across IPs in the backend IPs. :vartype backend_address_pool: ~azure.mgmt.network.models.SubResource :ivar provisioning_state: The provisioning state of the outbound rule resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar protocol: The protocol for the outbound rule in load balancer. Known values are: "Tcp", "Udp", and "All". @@ -26327,7 +27431,7 @@ class P2SConnectionConfiguration(SubResource): :vartype previous_configuration_policy_group_associations: list[~azure.mgmt.network.models.VpnServerConfigurationPolicyGroup] :ivar provisioning_state: The provisioning state of the P2SConnectionConfiguration resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -26469,7 +27573,7 @@ def __init__(self, *, vpn_connection_ids: Optional[List[str]] = None, **kwargs: self.vpn_connection_ids = vpn_connection_ids -class P2SVpnGateway(Resource): # pylint: disable=too-many-instance-attributes +class P2SVpnGateway(Resource): """P2SVpnGateway Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -26492,7 +27596,7 @@ class P2SVpnGateway(Resource): # pylint: disable=too-many-instance-attributes :vartype p2_s_connection_configurations: list[~azure.mgmt.network.models.P2SConnectionConfiguration] :ivar provisioning_state: The provisioning state of the P2S VPN gateway resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar vpn_gateway_scale_unit: The scale unit for this p2s vpn gateway. :vartype vpn_gateway_scale_unit: int @@ -27028,7 +28132,7 @@ def __init__( self.packet_capture_error = packet_capture_error -class PacketCaptureResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class PacketCaptureResult(_serialization.Model): """Information about packet capture session. Variables are only populated by the server, and will be ignored when sending a request. @@ -27068,7 +28172,7 @@ class PacketCaptureResult(_serialization.Model): # pylint: disable=too-many-ins 'SessionTimeLimitInSeconds' values. :vartype capture_settings: ~azure.mgmt.network.models.PacketCaptureSettings :ivar provisioning_state: The provisioning state of the packet capture session. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -27161,7 +28265,7 @@ def __init__( self.provisioning_state = None -class PacketCaptureResultProperties(PacketCaptureParameters): # pylint: disable=too-many-instance-attributes +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. @@ -27197,7 +28301,7 @@ class PacketCaptureResultProperties(PacketCaptureParameters): # pylint: disable 'SessionTimeLimitInSeconds' values. :vartype capture_settings: ~azure.mgmt.network.models.PacketCaptureSettings :ivar provisioning_state: The provisioning state of the packet capture session. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -27511,7 +28615,7 @@ class PatchRouteFilter(SubResource): :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. :vartype ipv6_peerings: list[~azure.mgmt.network.models.ExpressRouteCircuitPeering] :ivar provisioning_state: The provisioning state of the route filter resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -27583,7 +28687,7 @@ class PatchRouteFilterRule(SubResource): ['12076:5010','12076:5020']. :vartype communities: list[str] :ivar provisioning_state: The provisioning state of the route filter rule resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -27632,7 +28736,7 @@ def __init__( self.provisioning_state = None -class PeerExpressRouteCircuitConnection(SubResource): # pylint: disable=too-many-instance-attributes +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. @@ -27663,7 +28767,8 @@ class PeerExpressRouteCircuitConnection(SubResource): # pylint: disable=too-man circuit connection. :vartype auth_resource_guid: str :ivar provisioning_state: The provisioning state of the peer express route circuit connection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -27824,7 +28929,7 @@ def __init__(self, **kwargs: Any) -> None: self.weight = None -class PolicySettings(_serialization.Model): # pylint: disable=too-many-instance-attributes +class PolicySettings(_serialization.Model): """Defines contents of a web application firewall global configuration. :ivar state: The state of the policy. Known values are: "Disabled" and "Enabled". @@ -27980,6 +29085,173 @@ def __init__( self.scrubbing_rules = scrubbing_rules +class PoolAssociation(_serialization.Model): + """IpamPool association 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 server. + + :ivar resource_id: Resource id of the associated Azure resource. Required. + :vartype resource_id: str + :ivar pool_id: IpamPool id for which the resource is associated to. + :vartype pool_id: str + :ivar description: + :vartype description: str + :ivar address_prefixes: List of assigned IP address prefixes in the IpamPool of the associated + resource. + :vartype address_prefixes: list[str] + :ivar reserved_prefixes: List of reserved IP address prefixes in the IpamPool of the associated + resource. + :vartype reserved_prefixes: list[str] + :ivar total_number_of_ip_addresses: Total number of assigned IP addresses of the association. + :vartype total_number_of_ip_addresses: str + :ivar number_of_reserved_ip_addresses: Total number of reserved IP addresses of the + association. + :vartype number_of_reserved_ip_addresses: str + :ivar created_at: Creation time of the association. + :vartype created_at: ~datetime.datetime + :ivar reservation_expires_at: Expire time for IP addresses reserved. + :vartype reservation_expires_at: ~datetime.datetime + """ + + _validation = { + "resource_id": {"required": True}, + "address_prefixes": {"readonly": True}, + "reserved_prefixes": {"readonly": True}, + "total_number_of_ip_addresses": {"readonly": True}, + "number_of_reserved_ip_addresses": {"readonly": True}, + "created_at": {"readonly": True}, + "reservation_expires_at": {"readonly": True}, + } + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "pool_id": {"key": "poolId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "reserved_prefixes": {"key": "reservedPrefixes", "type": "[str]"}, + "total_number_of_ip_addresses": {"key": "totalNumberOfIPAddresses", "type": "str"}, + "number_of_reserved_ip_addresses": {"key": "numberOfReservedIPAddresses", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "reservation_expires_at": {"key": "reservationExpiresAt", "type": "iso-8601"}, + } + + def __init__( + self, *, resource_id: str, pool_id: Optional[str] = None, description: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword resource_id: Resource id of the associated Azure resource. Required. + :paramtype resource_id: str + :keyword pool_id: IpamPool id for which the resource is associated to. + :paramtype pool_id: str + :keyword description: + :paramtype description: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.pool_id = pool_id + self.description = description + self.address_prefixes = None + self.reserved_prefixes = None + self.total_number_of_ip_addresses = None + self.number_of_reserved_ip_addresses = None + self.created_at = None + self.reservation_expires_at = None + + +class PoolAssociationList(_serialization.Model): + """List of PoolAssociation. + + :ivar value: + :vartype value: list[~azure.mgmt.network.models.PoolAssociation] + :ivar next_link: The link used to get the next page of operations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PoolAssociation]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.PoolAssociation"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: + :paramtype value: list[~azure.mgmt.network.models.PoolAssociation] + :keyword next_link: The link used to get the next page of operations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PoolUsage(_serialization.Model): + """IpamPool usage information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar address_prefixes: List of IP address prefixes of the resource. + :vartype address_prefixes: list[str] + :ivar child_pools: List of IpamPool that are children of this IpamPool. + :vartype child_pools: list[~azure.mgmt.network.models.ResourceBasics] + :ivar allocated_address_prefixes: List of assigned IP address prefixes. + :vartype allocated_address_prefixes: list[str] + :ivar reserved_address_prefixes: List of reserved IP address prefixes. These IP addresses could + be reclaimed if not assigned in the given time. + :vartype reserved_address_prefixes: list[str] + :ivar available_address_prefixes: List of available IP address prefixes. + :vartype available_address_prefixes: list[str] + :ivar total_number_of_ip_addresses: Total number of IP addresses managed in the IpamPool. + :vartype total_number_of_ip_addresses: str + :ivar number_of_allocated_ip_addresses: Total number of assigned IP addresses in the IpamPool. + :vartype number_of_allocated_ip_addresses: str + :ivar number_of_reserved_ip_addresses: Total number of reserved IP addresses in the IpamPool. + :vartype number_of_reserved_ip_addresses: str + :ivar number_of_available_ip_addresses: Total number of available IP addresses in the IpamPool. + :vartype number_of_available_ip_addresses: str + """ + + _validation = { + "address_prefixes": {"readonly": True}, + "child_pools": {"readonly": True}, + "allocated_address_prefixes": {"readonly": True}, + "reserved_address_prefixes": {"readonly": True}, + "available_address_prefixes": {"readonly": True}, + "total_number_of_ip_addresses": {"readonly": True}, + "number_of_allocated_ip_addresses": {"readonly": True}, + "number_of_reserved_ip_addresses": {"readonly": True}, + "number_of_available_ip_addresses": {"readonly": True}, + } + + _attribute_map = { + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "child_pools": {"key": "childPools", "type": "[ResourceBasics]"}, + "allocated_address_prefixes": {"key": "allocatedAddressPrefixes", "type": "[str]"}, + "reserved_address_prefixes": {"key": "reservedAddressPrefixes", "type": "[str]"}, + "available_address_prefixes": {"key": "availableAddressPrefixes", "type": "[str]"}, + "total_number_of_ip_addresses": {"key": "totalNumberOfIPAddresses", "type": "str"}, + "number_of_allocated_ip_addresses": {"key": "numberOfAllocatedIPAddresses", "type": "str"}, + "number_of_reserved_ip_addresses": {"key": "numberOfReservedIPAddresses", "type": "str"}, + "number_of_available_ip_addresses": {"key": "numberOfAvailableIPAddresses", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.address_prefixes = None + self.child_pools = None + self.allocated_address_prefixes = None + self.reserved_address_prefixes = None + self.available_address_prefixes = None + self.total_number_of_ip_addresses = None + self.number_of_allocated_ip_addresses = None + self.number_of_reserved_ip_addresses = None + self.number_of_available_ip_addresses = None + + class PrepareNetworkPoliciesRequest(_serialization.Model): """Details of PrepareNetworkPolicies for Subnet. @@ -28069,7 +29341,7 @@ class PrivateDnsZoneGroup(SubResource): :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_dns_zone_configs: A collection of private dns zone configurations of the private dns zone group. @@ -28144,7 +29416,7 @@ def __init__(self, *, value: Optional[List["_models.PrivateDnsZoneGroup"]] = Non self.next_link = None -class PrivateEndpoint(Resource): # pylint: disable=too-many-instance-attributes +class PrivateEndpoint(Resource): """Private endpoint resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -28169,7 +29441,7 @@ class PrivateEndpoint(Resource): # pylint: disable=too-many-instance-attributes private endpoint. :vartype network_interfaces: list[~azure.mgmt.network.models.NetworkInterface] :ivar provisioning_state: The provisioning state of the private endpoint resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_link_service_connections: A grouping of information about the connection to the remote resource. @@ -28313,7 +29585,7 @@ class PrivateEndpointConnection(SubResource): :vartype private_link_service_connection_state: ~azure.mgmt.network.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state of the private endpoint connection resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar link_identifier: The consumer link id. :vartype link_identifier: str @@ -28501,7 +29773,7 @@ def __init__(self, *, value: Optional[List["_models.PrivateEndpoint"]] = None, * self.next_link = None -class PrivateLinkService(Resource): # pylint: disable=too-many-instance-attributes +class PrivateLinkService(Resource): """Private link service resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -28532,7 +29804,7 @@ class PrivateLinkService(Resource): # pylint: disable=too-many-instance-attribu private link service. :vartype network_interfaces: list[~azure.mgmt.network.models.NetworkInterface] :ivar provisioning_state: The provisioning state of the private link service resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_endpoint_connections: An array of list about connections to the private endpoint. :vartype private_endpoint_connections: @@ -28662,7 +29934,8 @@ class PrivateLinkServiceConnection(SubResource): :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_link_service_id: The resource id of private link service. :vartype private_link_service_id: str @@ -28807,7 +30080,8 @@ class PrivateLinkServiceIpConfiguration(SubResource): :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Known values are: "IPv4" and "IPv6". @@ -28961,7 +30235,7 @@ def __init__(self, *, visible: Optional[bool] = None, **kwargs: Any) -> None: self.visible = visible -class Probe(SubResource): # pylint: disable=too-many-instance-attributes +class Probe(SubResource): """A load balancer probe. Variables are only populated by the server, and will be ignored when sending a request. @@ -29008,7 +30282,7 @@ class Probe(SubResource): # pylint: disable=too-many-instance-attributes 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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -29149,7 +30423,7 @@ def __init__(self, *, http_configuration: Optional["_models.HTTPConfiguration"] self.http_configuration = http_configuration -class PublicIPAddress(Resource): # pylint: disable=too-many-instance-attributes +class PublicIPAddress(Resource): """Public IP address resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -29196,7 +30470,7 @@ class PublicIPAddress(Resource): # pylint: disable=too-many-instance-attributes :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar service_public_ip_address: The service public IP address of the public IP address resource. @@ -29524,7 +30798,7 @@ def __init__( self.ddos_protection_plan_id = ddos_protection_plan_id -class PublicIPPrefix(Resource): # pylint: disable=too-many-instance-attributes +class PublicIPPrefix(Resource): """Public IP prefix resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -29567,7 +30841,7 @@ class PublicIPPrefix(Resource): # pylint: disable=too-many-instance-attributes :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar nat_gateway: NatGateway of Public IP Prefix. :vartype nat_gateway: ~azure.mgmt.network.models.NatGateway @@ -30005,6 +31279,293 @@ def __init__( self.radius_server_secret = radius_server_secret +class ReachabilityAnalysisIntent(CommonProxyResource): + """Configuration information or intent on which to do the analysis on. + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar properties: Represents the Reachability Analysis Intent properties. Required. + :vartype properties: ~azure.mgmt.network.models.ReachabilityAnalysisIntentProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ReachabilityAnalysisIntentProperties"}, + } + + def __init__(self, *, properties: "_models.ReachabilityAnalysisIntentProperties", **kwargs: Any) -> None: + """ + :keyword properties: Represents the Reachability Analysis Intent properties. Required. + :paramtype properties: ~azure.mgmt.network.models.ReachabilityAnalysisIntentProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ReachabilityAnalysisIntentListResult(_serialization.Model): + """A list of Reachability Analysis Intents. + + :ivar value: Gets a page of Reachability Analysis Intents. + :vartype value: list[~azure.mgmt.network.models.ReachabilityAnalysisIntent] + :ivar next_link: Gets the URL to get the next page of results. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ReachabilityAnalysisIntent]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[List["_models.ReachabilityAnalysisIntent"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Gets a page of Reachability Analysis Intents. + :paramtype value: list[~azure.mgmt.network.models.ReachabilityAnalysisIntent] + :keyword next_link: Gets the URL to get the next page of results. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReachabilityAnalysisIntentProperties(_serialization.Model): + """Represents the Reachability Analysis Intent properties. + + All required parameters must be populated in order to send to server. + + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + :ivar description: + :vartype description: str + :ivar source_resource_id: Source resource id to verify the reachability path of. Required. + :vartype source_resource_id: str + :ivar destination_resource_id: Destination resource id to verify the reachability path of. + Required. + :vartype destination_resource_id: str + :ivar ip_traffic: IP traffic information. Required. + :vartype ip_traffic: ~azure.mgmt.network.models.IPTraffic + """ + + _validation = { + "source_resource_id": {"required": True}, + "destination_resource_id": {"required": True}, + "ip_traffic": {"required": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "source_resource_id": {"key": "sourceResourceId", "type": "str"}, + "destination_resource_id": {"key": "destinationResourceId", "type": "str"}, + "ip_traffic": {"key": "ipTraffic", "type": "IPTraffic"}, + } + + def __init__( + self, + *, + source_resource_id: str, + destination_resource_id: str, + ip_traffic: "_models.IPTraffic", + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :paramtype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + :keyword description: + :paramtype description: str + :keyword source_resource_id: Source resource id to verify the reachability path of. Required. + :paramtype source_resource_id: str + :keyword destination_resource_id: Destination resource id to verify the reachability path of. + Required. + :paramtype destination_resource_id: str + :keyword ip_traffic: IP traffic information. Required. + :paramtype ip_traffic: ~azure.mgmt.network.models.IPTraffic + """ + super().__init__(**kwargs) + self.provisioning_state = provisioning_state + self.description = description + self.source_resource_id = source_resource_id + self.destination_resource_id = destination_resource_id + self.ip_traffic = ip_traffic + + +class ReachabilityAnalysisRun(CommonProxyResource): + """Configuration information for analysis run. + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar properties: Represents the Reachability Analysis Run properties. Required. + :vartype properties: ~azure.mgmt.network.models.ReachabilityAnalysisRunProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ReachabilityAnalysisRunProperties"}, + } + + def __init__(self, *, properties: "_models.ReachabilityAnalysisRunProperties", **kwargs: Any) -> None: + """ + :keyword properties: Represents the Reachability Analysis Run properties. Required. + :paramtype properties: ~azure.mgmt.network.models.ReachabilityAnalysisRunProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ReachabilityAnalysisRunListResult(_serialization.Model): + """A list of Reachability Analysis Run. + + :ivar value: Gets a page of Reachability Analysis Runs. + :vartype value: list[~azure.mgmt.network.models.ReachabilityAnalysisRun] + :ivar next_link: Gets the URL to get the next page of results. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ReachabilityAnalysisRun]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[List["_models.ReachabilityAnalysisRun"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Gets a page of Reachability Analysis Runs. + :paramtype value: list[~azure.mgmt.network.models.ReachabilityAnalysisRun] + :keyword next_link: Gets the URL to get the next page of results. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReachabilityAnalysisRunProperties(_serialization.Model): + """Represents the Reachability Analysis Run properties. + + 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 server. + + :ivar description: + :vartype description: str + :ivar intent_id: Id of the intent resource to run analysis on. Required. + :vartype intent_id: str + :ivar intent_content: Intent information. + :vartype intent_content: ~azure.mgmt.network.models.IntentContent + :ivar analysis_result: + :vartype analysis_result: str + :ivar error_message: + :vartype error_message: str + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + + _validation = { + "intent_id": {"required": True}, + "intent_content": {"readonly": True}, + "analysis_result": {"readonly": True}, + "error_message": {"readonly": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "intent_id": {"key": "intentId", "type": "str"}, + "intent_content": {"key": "intentContent", "type": "IntentContent"}, + "analysis_result": {"key": "analysisResult", "type": "str"}, + "error_message": {"key": "errorMessage", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + intent_id: str, + description: Optional[str] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: + :paramtype description: str + :keyword intent_id: Id of the intent resource to run analysis on. Required. + :paramtype intent_id: str + :keyword provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :paramtype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + super().__init__(**kwargs) + self.description = description + self.intent_id = intent_id + self.intent_content = None + self.analysis_result = None + self.error_message = None + self.provisioning_state = provisioning_state + + class RecordSet(_serialization.Model): """A collective group of information about the record set information. @@ -30016,8 +31577,8 @@ class RecordSet(_serialization.Model): :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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the recordset. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar ttl: Recordset time to live. :vartype ttl: int @@ -30089,6 +31650,34 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.id = id +class ResourceBasics(_serialization.Model): + """Representation of basic resource information. + + :ivar resource_id: ResourceId of the Azure resource. + :vartype resource_id: str + :ivar address_prefixes: List of IP address prefixes of the resource. + :vartype address_prefixes: list[str] + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + } + + def __init__( + self, *, resource_id: Optional[str] = None, address_prefixes: Optional[List[str]] = None, **kwargs: Any + ) -> None: + """ + :keyword resource_id: ResourceId of the Azure resource. + :paramtype resource_id: str + :keyword address_prefixes: List of IP address prefixes of the resource. + :paramtype address_prefixes: list[str] + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.address_prefixes = address_prefixes + + class ResourceNavigationLink(SubResource): """ResourceNavigationLink resource. @@ -30108,7 +31697,7 @@ class ResourceNavigationLink(SubResource): :ivar link: Link to the external resource. :vartype link: str :ivar provisioning_state: The provisioning state of the resource navigation link resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -30236,7 +31825,7 @@ class Route(SubResource): 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. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar has_bgp_override: A value indicating whether this route overrides overlapping BGP routes regardless of LPM. @@ -30324,7 +31913,7 @@ class RouteFilter(Resource): :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. :vartype ipv6_peerings: list[~azure.mgmt.network.models.ExpressRouteCircuitPeering] :ivar provisioning_state: The provisioning state of the route filter resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -30427,7 +32016,7 @@ class RouteFilterRule(SubResource): ['12076:5010','12076:5020']. :vartype communities: list[str] :ivar provisioning_state: The provisioning state of the route filter rule resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -30563,7 +32152,7 @@ class RouteMap(SubResource): :ivar rules: List of RouteMap rules to be applied. :vartype rules: list[~azure.mgmt.network.models.RouteMapRule] :ivar provisioning_state: The provisioning state of the RouteMap resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -30666,7 +32255,7 @@ def __init__( self.next_step_if_matched = next_step_if_matched -class RouteTable(Resource): # pylint: disable=too-many-instance-attributes +class RouteTable(Resource): """Route table resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -30691,7 +32280,7 @@ class RouteTable(Resource): # pylint: disable=too-many-instance-attributes table. True means disable. :vartype disable_bgp_route_propagation: bool :ivar provisioning_state: The provisioning state of the route table resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: The resource GUID property of the route table. :vartype resource_guid: str @@ -30859,7 +32448,7 @@ class RoutingIntent(SubResource): :ivar routing_policies: List of routing policies. :vartype routing_policies: list[~azure.mgmt.network.models.RoutingPolicy] :ivar provisioning_state: The provisioning state of the RoutingIntent resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -30964,8 +32553,8 @@ class RoutingRule(ChildResource): :vartype system_data: ~azure.mgmt.network.models.SystemData :ivar description: A description for this rule. :vartype description: str - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -31040,8 +32629,8 @@ class RoutingRuleCollection(ChildResource): :vartype system_data: ~azure.mgmt.network.models.SystemData :ivar description: A description of the routing rule collection. :vartype description: str - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -31360,8 +32949,13 @@ class SecurityAdminConfiguration(ChildResource): services. :vartype apply_on_network_intent_policy_based_services: list[str or ~azure.mgmt.network.models.NetworkIntentPolicyBasedService] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar network_group_address_space_aggregation_option: Determine update behavior for changes to + network groups referenced within the rules in this configuration. Known values are: "None" and + "Manual". + :vartype network_group_address_space_aggregation_option: str or + ~azure.mgmt.network.models.AddressSpaceAggregationOption + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -31388,6 +32982,10 @@ class SecurityAdminConfiguration(ChildResource): "key": "properties.applyOnNetworkIntentPolicyBasedServices", "type": "[str]", }, + "network_group_address_space_aggregation_option": { + "key": "properties.networkGroupAddressSpaceAggregationOption", + "type": "str", + }, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "resource_guid": {"key": "properties.resourceGuid", "type": "str"}, } @@ -31399,6 +32997,9 @@ def __init__( apply_on_network_intent_policy_based_services: Optional[ List[Union[str, "_models.NetworkIntentPolicyBasedService"]] ] = None, + network_group_address_space_aggregation_option: Optional[ + Union[str, "_models.AddressSpaceAggregationOption"] + ] = None, **kwargs: Any ) -> None: """ @@ -31408,11 +33009,17 @@ def __init__( based services. :paramtype apply_on_network_intent_policy_based_services: list[str or ~azure.mgmt.network.models.NetworkIntentPolicyBasedService] + :keyword network_group_address_space_aggregation_option: Determine update behavior for changes + to network groups referenced within the rules in this configuration. Known values are: "None" + and "Manual". + :paramtype network_group_address_space_aggregation_option: str or + ~azure.mgmt.network.models.AddressSpaceAggregationOption """ super().__init__(**kwargs) self.system_data = None self.description = description self.apply_on_network_intent_policy_based_services = apply_on_network_intent_policy_based_services + self.network_group_address_space_aggregation_option = network_group_address_space_aggregation_option self.provisioning_state = None self.resource_guid = None @@ -31547,7 +33154,7 @@ class SecurityPartnerProvider(Resource): :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. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar security_provider_name: The security provider name. Known values are: "ZScaler", "IBoss", and "Checkpoint". @@ -31644,7 +33251,7 @@ def __init__( self.next_link = next_link -class SecurityRule(SubResource): # pylint: disable=too-many-instance-attributes +class SecurityRule(SubResource): """Network security rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -31703,7 +33310,7 @@ class SecurityRule(SubResource): # pylint: disable=too-many-instance-attributes on incoming or outgoing traffic. Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityRuleDirection :ivar provisioning_state: The provisioning state of the security rule resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -31938,8 +33545,8 @@ class SecurityUserConfiguration(ChildResource): :vartype system_data: ~azure.mgmt.network.models.SystemData :ivar description: A description of the security user configuration. :vartype description: str - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -32036,7 +33643,7 @@ def __init__(self, *, network_group_id: str, **kwargs: Any) -> None: self.network_group_id = network_group_id -class SecurityUserRule(ChildResource): # pylint: disable=too-many-instance-attributes +class SecurityUserRule(ChildResource): """Network security user rule. Variables are only populated by the server, and will be ignored when sending a request. @@ -32068,7 +33675,8 @@ class SecurityUserRule(ChildResource): # pylint: disable=too-many-instance-attr Known values are: "Inbound" and "Outbound". :vartype direction: str or ~azure.mgmt.network.models.SecurityConfigurationRuleDirection :ivar provisioning_state: The provisioning state of the security configuration user rule - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -32163,8 +33771,8 @@ class SecurityUserRuleCollection(ChildResource): :vartype description: str :ivar applies_to_groups: Groups for configuration. :vartype applies_to_groups: list[~azure.mgmt.network.models.SecurityUserGroupItem] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_guid: Unique identifier for this resource. :vartype resource_guid: str @@ -32296,7 +33904,7 @@ class ServiceAssociationLink(SubResource): :ivar link: Link to the external resource. :vartype link: str :ivar provisioning_state: The provisioning state of the service association link resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar allow_delete: If true, the resource can be deleted. :vartype allow_delete: bool @@ -32389,7 +33997,7 @@ def __init__(self, *, value: Optional[List["_models.ServiceAssociationLink"]] = self.next_link = None -class ServiceEndpointPolicy(Resource): # pylint: disable=too-many-instance-attributes +class ServiceEndpointPolicy(Resource): """Service End point policy resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -32418,7 +34026,7 @@ class ServiceEndpointPolicy(Resource): # pylint: disable=too-many-instance-attr :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar service_alias: The alias indicating if the policy belongs to a service. :vartype service_alias: str @@ -32518,7 +34126,8 @@ class ServiceEndpointPolicyDefinition(SubResource): :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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -32649,7 +34258,7 @@ class ServiceEndpointPropertiesFormat(_serialization.Model): :ivar locations: A list of locations. :vartype locations: list[str] :ivar provisioning_state: The provisioning state of the service endpoint resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -32882,7 +34491,7 @@ class SharedKeyProperties(_serialization.Model): :ivar shared_key_length: The length of the shared key for the vpn link connection. :vartype shared_key_length: int :ivar provisioning_state: The provisioning state of the SharedKey resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -33043,7 +34652,7 @@ def __init__(self, *, signatures: Optional[Dict[str, str]] = None, **kwargs: Any self.signatures = signatures -class SingleQueryResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SingleQueryResult(_serialization.Model): """SingleQueryResult. :ivar signature_id: The ID of the signature. @@ -33055,7 +34664,8 @@ class SingleQueryResult(_serialization.Model): # pylint: disable=too-many-insta values are: 1, 2, and 3. :vartype severity: int or ~azure.mgmt.network.models.FirewallPolicyIDPSSignatureSeverity :ivar direction: Describes in which direction signature is being enforced: 0 - OutBound, 1 - - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound. Known values are: 0, 1, 2, 3, and 4. + InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound. Known values are: 0, + 1, 2, 3, 4, and 5. :vartype direction: int or ~azure.mgmt.network.models.FirewallPolicyIDPSSignatureDirection :ivar group: Describes the groups the signature belongs to. :vartype group: str @@ -33115,7 +34725,8 @@ def __init__( values are: 1, 2, and 3. :paramtype severity: int or ~azure.mgmt.network.models.FirewallPolicyIDPSSignatureSeverity :keyword direction: Describes in which direction signature is being enforced: 0 - OutBound, 1 - - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound. Known values are: 0, 1, 2, 3, and 4. + InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound. Known values are: 0, + 1, 2, 3, 4, and 5. :paramtype direction: int or ~azure.mgmt.network.models.FirewallPolicyIDPSSignatureDirection :keyword group: Describes the groups the signature belongs to. :paramtype group: str @@ -33170,6 +34781,139 @@ def __init__(self, *, name: Union[str, "_models.BastionHostSkuName"] = "Standard self.name = name +class StaticCidr(CommonProxyResource): + """Instance of StaticCidr resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar properties: Properties of static CIDR resource. + :vartype properties: ~azure.mgmt.network.models.StaticCidrProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "StaticCidrProperties"}, + } + + def __init__(self, *, properties: Optional["_models.StaticCidrProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: Properties of static CIDR resource. + :paramtype properties: ~azure.mgmt.network.models.StaticCidrProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class StaticCidrList(_serialization.Model): + """List of StaticCidr. + + :ivar value: + :vartype value: list[~azure.mgmt.network.models.StaticCidr] + :ivar next_link: The link used to get the next page of operations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[StaticCidr]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.StaticCidr"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: + :paramtype value: list[~azure.mgmt.network.models.StaticCidr] + :keyword next_link: The link used to get the next page of operations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class StaticCidrProperties(_serialization.Model): + """Properties of static CIDR resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: + :vartype description: str + :ivar number_of_ip_addresses_to_allocate: Number of IP addresses to allocate for a static CIDR + resource. The IP addresses will be assigned based on IpamPools available space. + :vartype number_of_ip_addresses_to_allocate: str + :ivar address_prefixes: List of IP address prefixes of the resource. + :vartype address_prefixes: list[str] + :ivar total_number_of_ip_addresses: Total number of IP addresses allocated for the static CIDR + resource. + :vartype total_number_of_ip_addresses: str + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + + _validation = { + "total_number_of_ip_addresses": {"readonly": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "number_of_ip_addresses_to_allocate": {"key": "numberOfIPAddressesToAllocate", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "total_number_of_ip_addresses": {"key": "totalNumberOfIPAddresses", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + number_of_ip_addresses_to_allocate: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: + :paramtype description: str + :keyword number_of_ip_addresses_to_allocate: Number of IP addresses to allocate for a static + CIDR resource. The IP addresses will be assigned based on IpamPools available space. + :paramtype number_of_ip_addresses_to_allocate: str + :keyword address_prefixes: List of IP address prefixes of the resource. + :paramtype address_prefixes: list[str] + :keyword provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :paramtype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + super().__init__(**kwargs) + self.description = description + self.number_of_ip_addresses_to_allocate = number_of_ip_addresses_to_allocate + self.address_prefixes = address_prefixes + self.total_number_of_ip_addresses = None + self.provisioning_state = provisioning_state + + class StaticMember(ChildResource): """StaticMember Item. @@ -33190,7 +34934,7 @@ class StaticMember(ChildResource): :ivar region: Resource region. :vartype region: str :ivar provisioning_state: The provisioning state of the scope assignment resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -33336,7 +35080,7 @@ def __init__( self.vnet_local_route_override_criteria = vnet_local_route_override_criteria -class Subnet(SubResource): # pylint: disable=too-many-instance-attributes +class Subnet(SubResource): """Subnet in a virtual network resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -33384,7 +35128,7 @@ class Subnet(SubResource): # pylint: disable=too-many-instance-attributes delegations and other user-defined properties. :vartype purpose: str :ivar provisioning_state: The provisioning state of the subnet resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar private_endpoint_network_policies: Enable or Disable apply network policies on private end point in the subnet. Known values are: "Enabled", "Disabled", @@ -33408,6 +35152,9 @@ class Subnet(SubResource): # pylint: disable=too-many-instance-attributes connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet. :vartype default_outbound_access: bool + :ivar ipam_pool_prefix_allocations: A list of IPAM Pools for allocating IP address prefixes. + :vartype ipam_pool_prefix_allocations: + list[~azure.mgmt.network.models.IpamPoolPrefixAllocation] """ _validation = { @@ -33450,6 +35197,10 @@ class Subnet(SubResource): # pylint: disable=too-many-instance-attributes }, "sharing_scope": {"key": "properties.sharingScope", "type": "str"}, "default_outbound_access": {"key": "properties.defaultOutboundAccess", "type": "bool"}, + "ipam_pool_prefix_allocations": { + "key": "properties.ipamPoolPrefixAllocations", + "type": "[IpamPoolPrefixAllocation]", + }, } def __init__( # pylint: disable=too-many-locals @@ -33476,6 +35227,7 @@ def __init__( # pylint: disable=too-many-locals application_gateway_ip_configurations: Optional[List["_models.ApplicationGatewayIPConfiguration"]] = None, sharing_scope: Optional[Union[str, "_models.SharingScope"]] = None, default_outbound_access: Optional[bool] = None, + ipam_pool_prefix_allocations: Optional[List["_models.IpamPoolPrefixAllocation"]] = None, **kwargs: Any ) -> None: """ @@ -33526,6 +35278,9 @@ def __init__( # pylint: disable=too-many-locals connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet. :paramtype default_outbound_access: bool + :keyword ipam_pool_prefix_allocations: A list of IPAM Pools for allocating IP address prefixes. + :paramtype ipam_pool_prefix_allocations: + list[~azure.mgmt.network.models.IpamPoolPrefixAllocation] """ super().__init__(id=id, **kwargs) self.name = name @@ -33552,6 +35307,7 @@ def __init__( # pylint: disable=too-many-locals self.application_gateway_ip_configurations = application_gateway_ip_configurations self.sharing_scope = sharing_scope self.default_outbound_access = default_outbound_access + self.ipam_pool_prefix_allocations = ipam_pool_prefix_allocations class SubnetAssociation(_serialization.Model): @@ -34574,6 +36330,188 @@ def __init__( self.rule_name = rule_name +class VerifierWorkspace(CommonTrackedResource): + """Instance of Verifier Workspace. + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.network.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of Verifier Workspace resource. + :vartype properties: ~azure.mgmt.network.models.VerifierWorkspaceProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "VerifierWorkspaceProperties"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.VerifierWorkspaceProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword properties: Properties of Verifier Workspace resource. + :paramtype properties: ~azure.mgmt.network.models.VerifierWorkspaceProperties + """ + super().__init__(tags=tags, location=location, **kwargs) + self.properties = properties + + +class VerifierWorkspaceListResult(_serialization.Model): + """A list of Verifier Workspace. + + :ivar value: Gets a page of Verifier Workspaces. + :vartype value: list[~azure.mgmt.network.models.VerifierWorkspace] + :ivar next_link: Gets the URL to get the next page of results. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[VerifierWorkspace]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[List["_models.VerifierWorkspace"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Gets a page of Verifier Workspaces. + :paramtype value: list[~azure.mgmt.network.models.VerifierWorkspace] + :keyword next_link: Gets the URL to get the next page of results. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VerifierWorkspaceProperties(_serialization.Model): + """Properties of Verifier Workspace resource. + + :ivar description: + :vartype description: str + :ivar provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: + :paramtype description: str + :keyword provisioning_state: Provisioning states of a resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". + :paramtype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState + """ + super().__init__(**kwargs) + self.description = description + self.provisioning_state = provisioning_state + + +class VerifierWorkspaceUpdate(_serialization.Model): + """Represents the VerifierWorkspace update API request interface. + + :ivar tags: Dictionary of :code:``. + :vartype tags: dict[str, str] + :ivar properties: Represents the VerifierWorkspace update properties. + :vartype properties: ~azure.mgmt.network.models.VerifierWorkspaceUpdateProperties + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "properties": {"key": "properties", "type": "VerifierWorkspaceUpdateProperties"}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.VerifierWorkspaceUpdateProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Dictionary of :code:``. + :paramtype tags: dict[str, str] + :keyword properties: Represents the VerifierWorkspace update properties. + :paramtype properties: ~azure.mgmt.network.models.VerifierWorkspaceUpdateProperties + """ + super().__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class VerifierWorkspaceUpdateProperties(_serialization.Model): + """Represents the VerifierWorkspace update properties. + + :ivar description: + :vartype description: str + """ + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + } + + def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword description: + :paramtype description: str + """ + super().__init__(**kwargs) + self.description = description + + class VirtualApplianceAdditionalNicProperties(_serialization.Model): """Network Virtual Appliance Additional NIC properties. @@ -34771,8 +36709,8 @@ class VirtualApplianceSite(SubResource): :vartype address_prefix: str :ivar o365_policy: Office 365 Policy. :vartype o365_policy: ~azure.mgmt.network.models.Office365PolicyProperties - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -34859,7 +36797,7 @@ def __init__( self.market_place_version = market_place_version -class VirtualHub(Resource): # pylint: disable=too-many-instance-attributes +class VirtualHub(Resource): """VirtualHub Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -34896,7 +36834,7 @@ class VirtualHub(Resource): # pylint: disable=too-many-instance-attributes :ivar route_table: The routeTable associated with this virtual hub. :vartype route_table: ~azure.mgmt.network.models.VirtualHubRouteTable :ivar provisioning_state: The provisioning state of the virtual hub resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar security_provider_name: The Security Provider name. :vartype security_provider_name: str @@ -35247,7 +37185,7 @@ class VirtualHubRouteTableV2(SubResource): :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. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -35339,7 +37277,7 @@ def __init__( self.next_hops = next_hops -class VirtualNetwork(Resource): # pylint: disable=too-many-instance-attributes +class VirtualNetwork(Resource): """Virtual Network resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -35373,7 +37311,7 @@ class VirtualNetwork(Resource): # pylint: disable=too-many-instance-attributes :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.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 @@ -35654,7 +37592,7 @@ def __init__( self.enforcement = enforcement -class VirtualNetworkGateway(Resource): # pylint: disable=too-many-instance-attributes +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. @@ -35722,7 +37660,7 @@ class VirtualNetworkGateway(Resource): # pylint: disable=too-many-instance-attr :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar enable_dns_forwarding: Whether dns forwarding is enabled or not. :vartype enable_dns_forwarding: bool @@ -35999,7 +37937,7 @@ def __init__( self.bounds = bounds -class VirtualNetworkGatewayConnection(Resource): # pylint: disable=too-many-instance-attributes +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. @@ -36077,7 +38015,8 @@ class VirtualNetworkGatewayConnection(Resource): # pylint: disable=too-many-ins resource. :vartype resource_guid: str :ivar provisioning_state: The provisioning state of the virtual network gateway connection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. :vartype express_route_gateway_bypass: bool @@ -36259,7 +38198,7 @@ def __init__( # pylint: disable=too-many-locals self.enable_private_link_fast_path = enable_private_link_fast_path -class VirtualNetworkGatewayConnectionListEntity(Resource): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualNetworkGatewayConnectionListEntity(Resource): # pylint: disable=name-too-long """A common class for general resource information. Variables are only populated by the server, and will be ignored when sending a request. @@ -36332,7 +38271,8 @@ class VirtualNetworkGatewayConnectionListEntity(Resource): # pylint: disable=to resource. :vartype resource_guid: str :ivar provisioning_state: The provisioning state of the virtual network gateway connection - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. :vartype express_route_gateway_bypass: bool @@ -36562,7 +38502,8 @@ class VirtualNetworkGatewayIPConfiguration(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. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + configuration resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", + "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -36696,7 +38637,7 @@ class VirtualNetworkGatewayNatRule(SubResource): :ivar type: Resource type. :vartype type: str :ivar provisioning_state: The provisioning state of the NAT Rule resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar type_properties_type: The type of NAT rule for VPN NAT. Known values are: "Static" and "Dynamic". @@ -36797,7 +38738,8 @@ class VirtualNetworkGatewayPolicyGroup(SubResource): vngClientConnectionConfigurations. :vartype vng_client_connection_configurations: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayPolicyGroup - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -37006,7 +38948,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: self.next_link = next_link -class VirtualNetworkPeering(SubResource): # pylint: disable=too-many-instance-attributes +class VirtualNetworkPeering(SubResource): """Peerings in a virtual network resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -37062,7 +39004,7 @@ class VirtualNetworkPeering(SubResource): # pylint: disable=too-many-instance-a are: "FullyInSync", "RemoteNotInSync", "LocalNotInSync", and "LocalAndRemoteNotInSync". :vartype peering_sync_level: str or ~azure.mgmt.network.models.VirtualNetworkPeeringLevel :ivar provisioning_state: The provisioning state of the virtual network peering resource. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar do_not_verify_remote_gateways: If we need to verify the provisioning state of the remote gateway. @@ -37270,7 +39212,7 @@ def __init__( self.next_link = next_link -class VirtualNetworkTap(Resource): # pylint: disable=too-many-instance-attributes +class VirtualNetworkTap(Resource): """Virtual Network Tap resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -37294,7 +39236,7 @@ class VirtualNetworkTap(Resource): # pylint: disable=too-many-instance-attribut :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. Known - values are: "Succeeded", "Updating", "Deleting", and "Failed". + values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar destination_network_interface_ip_configuration: The reference to the private IP Address of the collector nic that will receive the tap. @@ -37483,7 +39425,7 @@ def __init__(self, **kwargs: Any) -> None: self.value = None -class VirtualRouter(Resource): # pylint: disable=too-many-instance-attributes +class VirtualRouter(Resource): """VirtualRouter Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -37510,8 +39452,8 @@ class VirtualRouter(Resource): # pylint: disable=too-many-instance-attributes :vartype hosted_gateway: ~azure.mgmt.network.models.SubResource :ivar peerings: List of references to VirtualRouterPeerings. :vartype peerings: list[~azure.mgmt.network.models.SubResource] - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -37646,8 +39588,8 @@ class VirtualRouterPeering(SubResource): :vartype peer_asn: int :ivar peer_ip: Peer IP. :vartype peer_ip: str - :ivar provisioning_state: The provisioning state of the resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Failed", + "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -37728,7 +39670,7 @@ def __init__( self.next_link = next_link -class VirtualWAN(Resource): # pylint: disable=too-many-instance-attributes +class VirtualWAN(Resource): """VirtualWAN Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -37760,7 +39702,7 @@ class VirtualWAN(Resource): # pylint: disable=too-many-instance-attributes :vartype office365_local_breakout_category: str or ~azure.mgmt.network.models.OfficeTrafficCategory :ivar provisioning_state: The provisioning state of the virtual WAN resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar type_properties_type: The type of the VirtualWAN. :vartype type_properties_type: str @@ -38006,7 +39948,8 @@ class VngClientConnectionConfiguration(SubResource): virtualNetworkGatewayPolicyGroups. :vartype virtual_network_gateway_policy_groups: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the VngClientConnectionConfiguration - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -38057,7 +40000,7 @@ def __init__( self.provisioning_state = None -class VpnClientConfiguration(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VpnClientConfiguration(_serialization.Model): """VpnClientConfiguration for P2S client. :ivar vpn_client_address_pool: The reference to the address space resource which represents @@ -38247,7 +40190,7 @@ def __init__( self.allocated_ip_addresses = allocated_ip_addresses -class VpnClientConnectionHealthDetail(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VpnClientConnectionHealthDetail(_serialization.Model): """VPN client connection health detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -38527,7 +40470,8 @@ class VpnClientRevokedCertificate(SubResource): :ivar thumbprint: The revoked VPN client certificate thumbprint. :vartype thumbprint: str :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -38585,7 +40529,7 @@ class VpnClientRootCertificate(SubResource): :ivar public_cert_data: The certificate public data. Required. :vartype public_cert_data: str :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -38627,7 +40571,7 @@ def __init__( self.provisioning_state = None -class VpnConnection(SubResource): # pylint: disable=too-many-instance-attributes +class VpnConnection(SubResource): """VpnConnection Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -38676,7 +40620,7 @@ class VpnConnection(SubResource): # pylint: disable=too-many-instance-attribute :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. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar vpn_link_connections: List of all vpn site link connections to the gateway. :vartype vpn_link_connections: list[~azure.mgmt.network.models.VpnSiteLinkConnection] @@ -38901,7 +40845,7 @@ def __init__( self.firmware_version = firmware_version -class VpnGateway(Resource): # pylint: disable=too-many-instance-attributes +class VpnGateway(Resource): """VpnGateway Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -38925,7 +40869,7 @@ class VpnGateway(Resource): # pylint: disable=too-many-instance-attributes :ivar bgp_settings: Local network gateway's BGP speaker settings. :vartype bgp_settings: ~azure.mgmt.network.models.BgpSettings :ivar provisioning_state: The provisioning state of the VPN gateway resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar vpn_gateway_scale_unit: The scale unit for this vpn gateway. :vartype vpn_gateway_scale_unit: int @@ -39058,7 +41002,7 @@ def __init__( self.private_ip_address = private_ip_address -class VpnGatewayNatRule(SubResource): # pylint: disable=too-many-instance-attributes +class VpnGatewayNatRule(SubResource): """VpnGatewayNatRule Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -39073,7 +41017,7 @@ class VpnGatewayNatRule(SubResource): # pylint: disable=too-many-instance-attri :ivar type: Resource type. :vartype type: str :ivar provisioning_state: The provisioning state of the NAT Rule resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar type_properties_type: The type of NAT rule for VPN NAT. Known values are: "Static" and "Dynamic". @@ -39396,7 +41340,7 @@ def __init__(self, *, name: Optional[str] = None, public_cert_data: Optional[str self.public_cert_data = public_cert_data -class VpnServerConfiguration(Resource): # pylint: disable=too-many-instance-attributes +class VpnServerConfiguration(Resource): """VpnServerConfiguration Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -39625,7 +41569,8 @@ class VpnServerConfigurationPolicyGroup(SubResource): :ivar p2_s_connection_configurations: List of references to P2SConnectionConfigurations. :vartype p2_s_connection_configurations: list[~azure.mgmt.network.models.SubResource] :ivar provisioning_state: The provisioning state of the VpnServerConfigurationPolicyGroup - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -39800,7 +41745,7 @@ def __init__(self, *, name: Optional[str] = None, public_cert_data: Optional[str self.public_cert_data = public_cert_data -class VpnSite(Resource): # pylint: disable=too-many-instance-attributes +class VpnSite(Resource): """VpnSite Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -39830,7 +41775,7 @@ class VpnSite(Resource): # pylint: disable=too-many-instance-attributes :ivar bgp_properties: The set of bgp properties. :vartype bgp_properties: ~azure.mgmt.network.models.BgpSettings :ivar provisioning_state: The provisioning state of the VPN site resource. Known values are: - "Succeeded", "Updating", "Deleting", and "Failed". + "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar is_security_site: IsSecuritySite flag. :vartype is_security_site: bool @@ -39969,7 +41914,7 @@ class VpnSiteLink(SubResource): :ivar bgp_properties: The set of bgp properties. :vartype bgp_properties: ~azure.mgmt.network.models.VpnLinkBgpSettings :ivar provisioning_state: The provisioning state of the VPN site link resource. Known values - are: "Succeeded", "Updating", "Deleting", and "Failed". + are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState """ @@ -40028,7 +41973,7 @@ def __init__( self.provisioning_state = None -class VpnSiteLinkConnection(SubResource): # pylint: disable=too-many-instance-attributes +class VpnSiteLinkConnection(SubResource): """VpnSiteLinkConnection Resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -40078,7 +42023,7 @@ class VpnSiteLinkConnection(SubResource): # pylint: disable=too-many-instance-a :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. - Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar ingress_nat_rules: List of ingress NatRules. :vartype ingress_nat_rules: list[~azure.mgmt.network.models.SubResource] @@ -40329,7 +42274,7 @@ def __init__( self.action = action -class WebApplicationFirewallPolicy(Resource): # pylint: disable=too-many-instance-attributes +class WebApplicationFirewallPolicy(Resource): """Defines web application firewall policy. Variables are only populated by the server, and will be ignored when sending a request. @@ -40353,7 +42298,8 @@ class WebApplicationFirewallPolicy(Resource): # pylint: disable=too-many-instan :ivar application_gateways: A collection of references to application gateways. :vartype application_gateways: list[~azure.mgmt.network.models.ApplicationGateway] :ivar provisioning_state: The provisioning state of the web application firewall policy - resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". + resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and + "Deleting". :vartype provisioning_state: str or ~azure.mgmt.network.models.ProvisioningState :ivar resource_state: Resource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_network_management_client_enums.py index aeda911f62d0..1008793fd552 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_network_management_client_enums.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_network_management_client_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -32,6 +33,16 @@ class AddressPrefixType(str, Enum, metaclass=CaseInsensitiveEnumMeta): IP_PREFIX = "IPPrefix" SERVICE_TAG = "ServiceTag" + NETWORK_GROUP = "NetworkGroup" + + +class AddressSpaceAggregationOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Option indicating the update behavior of a resource's address prefixes referenced within a + network manager configuration. + """ + + NONE = "None" + MANUAL = "Manual" class AdminRuleKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -781,6 +792,49 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): EDGE_ZONE = "EdgeZone" +class FailoverConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current status of the connection.""" + + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + + +class FailoverTestStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current status of the test.""" + + NOT_STARTED = "NotStarted" + STARTING = "Starting" + RUNNING = "Running" + START_FAILED = "StartFailed" + STOPPING = "Stopping" + COMPLETED = "Completed" + STOP_FAILED = "StopFailed" + INVALID = "Invalid" + EXPIRED = "Expired" + + +class FailoverTestStatusForSingleTest(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current status of the test.""" + + NOT_STARTED = "NotStarted" + STARTING = "Starting" + RUNNING = "Running" + START_FAILED = "StartFailed" + STOPPING = "Stopping" + COMPLETED = "Completed" + STOP_FAILED = "StopFailed" + INVALID = "Invalid" + EXPIRED = "Expired" + + +class FailoverTestType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of failover test.""" + + SINGLE_SITE_FAILOVER = "SingleSiteFailover" + MULTI_SITE_FAILOVER = "MultiSiteFailover" + ALL = "All" + + class FirewallPolicyFilterRuleCollectionActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The action type of a rule.""" @@ -797,7 +851,7 @@ class FirewallPolicyIDPSQuerySortOrder(str, Enum, metaclass=CaseInsensitiveEnumM class FirewallPolicyIDPSSignatureDirection(int, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - - Internal, 4 - InternalOutbound. + - Internal, 4 - InternalOutbound, 5 - InternalInbound. """ ZERO = 0 @@ -805,6 +859,7 @@ class FirewallPolicyIDPSSignatureDirection(int, Enum, metaclass=CaseInsensitiveE TWO = 2 THREE = 3 FOUR = 4 + FIVE = 5 class FirewallPolicyIDPSSignatureMode(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1069,6 +1124,13 @@ class IpsecIntegrity(str, Enum, metaclass=CaseInsensitiveEnumMeta): GCMAES256 = "GCMAES256" +class IpType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enumeration to indicate the IP type.""" + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + + class IPVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """IP address version.""" @@ -1212,6 +1274,15 @@ class NetworkOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): FAILED = "Failed" +class NetworkProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network Protocol.""" + + ANY = "Any" + TCP = "TCP" + UDP = "UDP" + ICMP = "ICMP" + + class NextHopType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Next hop type.""" @@ -1422,12 +1493,14 @@ class ProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current provisioning state.""" + """Provisioning states of a resource.""" + FAILED = "Failed" SUCCEEDED = "Succeeded" + CANCELED = "Canceled" + CREATING = "Creating" UPDATING = "Updating" DELETING = "Deleting" - FAILED = "Failed" class PublicIpAddressDnsSettingsDomainNameLabelScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/__init__.py index 4b81121ddaeb..a3eddedae9de 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/__init__.py @@ -5,152 +5,163 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ApplicationGatewaysOperations -from ._operations import ApplicationGatewayPrivateLinkResourcesOperations -from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations -from ._operations import ApplicationGatewayWafDynamicManifestsDefaultOperations -from ._operations import ApplicationGatewayWafDynamicManifestsOperations -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 VipSwapOperations -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 ExpressRouteProviderPortsLocationOperations -from ._operations import FirewallPoliciesOperations -from ._operations import FirewallPolicyRuleCollectionGroupsOperations -from ._operations import FirewallPolicyIdpsSignaturesOperations -from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations -from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations -from ._operations import FirewallPolicyDraftsOperations -from ._operations import FirewallPolicyDeploymentsOperations -from ._operations import FirewallPolicyRuleCollectionGroupDraftsOperations -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 NetworkManagersOperations -from ._operations import NetworkManagerCommitsOperations -from ._operations import NetworkManagerDeploymentStatusOperations -from ._operations import SubscriptionNetworkManagerConnectionsOperations -from ._operations import ManagementGroupNetworkManagerConnectionsOperations -from ._operations import ConnectivityConfigurationsOperations -from ._operations import NetworkGroupsOperations -from ._operations import StaticMembersOperations -from ._operations import ScopeConnectionsOperations -from ._operations import SecurityAdminConfigurationsOperations -from ._operations import AdminRuleCollectionsOperations -from ._operations import AdminRulesOperations -from ._operations import SecurityUserConfigurationsOperations -from ._operations import SecurityUserRuleCollectionsOperations -from ._operations import SecurityUserRulesOperations -from ._operations import NetworkManagerRoutingConfigurationsOperations -from ._operations import RoutingRuleCollectionsOperations -from ._operations import RoutingRulesOperations -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 RouteMapsOperations -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 NetworkVirtualApplianceConnectionsOperations -from ._operations import VirtualHubBgpConnectionOperations -from ._operations import VirtualHubBgpConnectionsOperations -from ._operations import VirtualHubIpConfigurationOperations -from ._operations import HubRouteTablesOperations -from ._operations import RoutingIntentOperations -from ._operations import WebApplicationFirewallPoliciesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ApplicationGatewaysOperations # type: ignore +from ._operations import ApplicationGatewayPrivateLinkResourcesOperations # type: ignore +from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations # type: ignore +from ._operations import ApplicationGatewayWafDynamicManifestsDefaultOperations # type: ignore +from ._operations import ApplicationGatewayWafDynamicManifestsOperations # type: ignore +from ._operations import ApplicationSecurityGroupsOperations # type: ignore +from ._operations import AvailableDelegationsOperations # type: ignore +from ._operations import AvailableResourceGroupDelegationsOperations # type: ignore +from ._operations import AvailableServiceAliasesOperations # type: ignore +from ._operations import AzureFirewallsOperations # type: ignore +from ._operations import AzureFirewallFqdnTagsOperations # type: ignore +from ._operations import WebCategoriesOperations # type: ignore +from ._operations import BastionHostsOperations # type: ignore +from ._operations import NetworkManagementClientOperationsMixin # type: ignore +from ._operations import NetworkInterfacesOperations # type: ignore +from ._operations import PublicIPAddressesOperations # type: ignore +from ._operations import VipSwapOperations # type: ignore +from ._operations import CustomIPPrefixesOperations # type: ignore +from ._operations import DdosCustomPoliciesOperations # type: ignore +from ._operations import DdosProtectionPlansOperations # type: ignore +from ._operations import DscpConfigurationOperations # type: ignore +from ._operations import AvailableEndpointServicesOperations # type: ignore +from ._operations import ExpressRouteCircuitAuthorizationsOperations # type: ignore +from ._operations import ExpressRouteCircuitPeeringsOperations # type: ignore +from ._operations import ExpressRouteCircuitConnectionsOperations # type: ignore +from ._operations import PeerExpressRouteCircuitConnectionsOperations # type: ignore +from ._operations import ExpressRouteCircuitsOperations # type: ignore +from ._operations import ExpressRouteServiceProvidersOperations # type: ignore +from ._operations import ExpressRouteCrossConnectionsOperations # type: ignore +from ._operations import ExpressRouteCrossConnectionPeeringsOperations # type: ignore +from ._operations import ExpressRoutePortsLocationsOperations # type: ignore +from ._operations import ExpressRoutePortsOperations # type: ignore +from ._operations import ExpressRouteLinksOperations # type: ignore +from ._operations import ExpressRoutePortAuthorizationsOperations # type: ignore +from ._operations import ExpressRouteProviderPortsLocationOperations # type: ignore +from ._operations import FirewallPoliciesOperations # type: ignore +from ._operations import FirewallPolicyRuleCollectionGroupsOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations # type: ignore +from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations # type: ignore +from ._operations import FirewallPolicyDraftsOperations # type: ignore +from ._operations import FirewallPolicyDeploymentsOperations # type: ignore +from ._operations import FirewallPolicyRuleCollectionGroupDraftsOperations # type: ignore +from ._operations import IpamPoolsOperations # type: ignore +from ._operations import StaticCidrsOperations # type: ignore +from ._operations import IpAllocationsOperations # type: ignore +from ._operations import IpGroupsOperations # type: ignore +from ._operations import LoadBalancersOperations # type: ignore +from ._operations import LoadBalancerBackendAddressPoolsOperations # type: ignore +from ._operations import LoadBalancerFrontendIPConfigurationsOperations # type: ignore +from ._operations import InboundNatRulesOperations # type: ignore +from ._operations import LoadBalancerLoadBalancingRulesOperations # type: ignore +from ._operations import LoadBalancerOutboundRulesOperations # type: ignore +from ._operations import LoadBalancerNetworkInterfacesOperations # type: ignore +from ._operations import LoadBalancerProbesOperations # type: ignore +from ._operations import NatGatewaysOperations # type: ignore +from ._operations import NetworkInterfaceIPConfigurationsOperations # type: ignore +from ._operations import NetworkInterfaceLoadBalancersOperations # type: ignore +from ._operations import NetworkInterfaceTapConfigurationsOperations # type: ignore +from ._operations import NetworkManagersOperations # type: ignore +from ._operations import NetworkManagerCommitsOperations # type: ignore +from ._operations import NetworkManagerDeploymentStatusOperations # type: ignore +from ._operations import SubscriptionNetworkManagerConnectionsOperations # type: ignore +from ._operations import ManagementGroupNetworkManagerConnectionsOperations # type: ignore +from ._operations import ConnectivityConfigurationsOperations # type: ignore +from ._operations import NetworkGroupsOperations # type: ignore +from ._operations import StaticMembersOperations # type: ignore +from ._operations import NetworkManagerRoutingConfigurationsOperations # type: ignore +from ._operations import RoutingRuleCollectionsOperations # type: ignore +from ._operations import RoutingRulesOperations # type: ignore +from ._operations import ScopeConnectionsOperations # type: ignore +from ._operations import SecurityAdminConfigurationsOperations # type: ignore +from ._operations import AdminRuleCollectionsOperations # type: ignore +from ._operations import AdminRulesOperations # type: ignore +from ._operations import SecurityUserConfigurationsOperations # type: ignore +from ._operations import SecurityUserRuleCollectionsOperations # type: ignore +from ._operations import SecurityUserRulesOperations # type: ignore +from ._operations import NetworkProfilesOperations # type: ignore +from ._operations import NetworkSecurityGroupsOperations # type: ignore +from ._operations import SecurityRulesOperations # type: ignore +from ._operations import DefaultSecurityRulesOperations # type: ignore +from ._operations import ReachabilityAnalysisIntentsOperations # type: ignore +from ._operations import ReachabilityAnalysisRunsOperations # type: ignore +from ._operations import VerifierWorkspacesOperations # type: ignore +from ._operations import NetworkVirtualAppliancesOperations # type: ignore +from ._operations import VirtualApplianceSitesOperations # type: ignore +from ._operations import VirtualApplianceSkusOperations # type: ignore +from ._operations import InboundSecurityRuleOperations # type: ignore +from ._operations import NetworkWatchersOperations # type: ignore +from ._operations import PacketCapturesOperations # type: ignore +from ._operations import ConnectionMonitorsOperations # type: ignore +from ._operations import FlowLogsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import PrivateEndpointsOperations # type: ignore +from ._operations import AvailablePrivateEndpointTypesOperations # type: ignore +from ._operations import PrivateDnsZoneGroupsOperations # type: ignore +from ._operations import PrivateLinkServicesOperations # type: ignore +from ._operations import PublicIPPrefixesOperations # type: ignore +from ._operations import RouteFiltersOperations # type: ignore +from ._operations import RouteFilterRulesOperations # type: ignore +from ._operations import RouteTablesOperations # type: ignore +from ._operations import RoutesOperations # type: ignore +from ._operations import SecurityPartnerProvidersOperations # type: ignore +from ._operations import BgpServiceCommunitiesOperations # type: ignore +from ._operations import ServiceEndpointPoliciesOperations # type: ignore +from ._operations import ServiceEndpointPolicyDefinitionsOperations # type: ignore +from ._operations import ServiceTagsOperations # type: ignore +from ._operations import ServiceTagInformationOperations # type: ignore +from ._operations import UsagesOperations # type: ignore +from ._operations import VirtualNetworksOperations # type: ignore +from ._operations import SubnetsOperations # type: ignore +from ._operations import ResourceNavigationLinksOperations # type: ignore +from ._operations import ServiceAssociationLinksOperations # type: ignore +from ._operations import VirtualNetworkPeeringsOperations # type: ignore +from ._operations import VirtualNetworkGatewaysOperations # type: ignore +from ._operations import VirtualNetworkGatewayConnectionsOperations # type: ignore +from ._operations import LocalNetworkGatewaysOperations # type: ignore +from ._operations import VirtualNetworkGatewayNatRulesOperations # type: ignore +from ._operations import VirtualNetworkTapsOperations # type: ignore +from ._operations import VirtualRoutersOperations # type: ignore +from ._operations import VirtualRouterPeeringsOperations # type: ignore +from ._operations import VirtualWansOperations # type: ignore +from ._operations import VpnSitesOperations # type: ignore +from ._operations import VpnSiteLinksOperations # type: ignore +from ._operations import VpnSitesConfigurationOperations # type: ignore +from ._operations import VpnServerConfigurationsOperations # type: ignore +from ._operations import ConfigurationPolicyGroupsOperations # type: ignore +from ._operations import VirtualHubsOperations # type: ignore +from ._operations import RouteMapsOperations # type: ignore +from ._operations import HubVirtualNetworkConnectionsOperations # type: ignore +from ._operations import VpnGatewaysOperations # type: ignore +from ._operations import VpnLinkConnectionsOperations # type: ignore +from ._operations import VpnConnectionsOperations # type: ignore +from ._operations import VpnSiteLinkConnectionsOperations # type: ignore +from ._operations import NatRulesOperations # type: ignore +from ._operations import P2SVpnGatewaysOperations # type: ignore +from ._operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations # type: ignore +from ._operations import VirtualHubRouteTableV2SOperations # type: ignore +from ._operations import ExpressRouteGatewaysOperations # type: ignore +from ._operations import ExpressRouteConnectionsOperations # type: ignore +from ._operations import NetworkVirtualApplianceConnectionsOperations # type: ignore +from ._operations import VirtualHubBgpConnectionOperations # type: ignore +from ._operations import VirtualHubBgpConnectionsOperations # type: ignore +from ._operations import VirtualHubIpConfigurationOperations # type: ignore +from ._operations import HubRouteTablesOperations # type: ignore +from ._operations import RoutingIntentOperations # type: ignore +from ._operations import WebApplicationFirewallPoliciesOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -197,6 +208,8 @@ "FirewallPolicyDraftsOperations", "FirewallPolicyDeploymentsOperations", "FirewallPolicyRuleCollectionGroupDraftsOperations", + "IpamPoolsOperations", + "StaticCidrsOperations", "IpAllocationsOperations", "IpGroupsOperations", "LoadBalancersOperations", @@ -219,6 +232,9 @@ "ConnectivityConfigurationsOperations", "NetworkGroupsOperations", "StaticMembersOperations", + "NetworkManagerRoutingConfigurationsOperations", + "RoutingRuleCollectionsOperations", + "RoutingRulesOperations", "ScopeConnectionsOperations", "SecurityAdminConfigurationsOperations", "AdminRuleCollectionsOperations", @@ -226,13 +242,13 @@ "SecurityUserConfigurationsOperations", "SecurityUserRuleCollectionsOperations", "SecurityUserRulesOperations", - "NetworkManagerRoutingConfigurationsOperations", - "RoutingRuleCollectionsOperations", - "RoutingRulesOperations", "NetworkProfilesOperations", "NetworkSecurityGroupsOperations", "SecurityRulesOperations", "DefaultSecurityRulesOperations", + "ReachabilityAnalysisIntentsOperations", + "ReachabilityAnalysisRunsOperations", + "VerifierWorkspacesOperations", "NetworkVirtualAppliancesOperations", "VirtualApplianceSitesOperations", "VirtualApplianceSkusOperations", @@ -297,5 +313,5 @@ "RoutingIntentOperations", "WebApplicationFirewallPoliciesOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_operations.py index 91c716fb3151..6d3df1973485 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -51,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +50,7 @@ def build_application_gateways_delete_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -96,7 +81,7 @@ def build_application_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,7 +112,7 @@ def build_application_gateways_create_or_update_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -161,7 +146,7 @@ def build_application_gateways_update_tags_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +180,7 @@ def build_application_gateways_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -225,7 +210,7 @@ def build_application_gateways_list_all_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -251,7 +236,7 @@ def build_application_gateways_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -282,7 +267,7 @@ def build_application_gateways_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -318,7 +303,7 @@ def build_application_gateways_backend_health_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -356,7 +341,7 @@ def build_application_gateways_backend_health_on_demand_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -392,7 +377,7 @@ def build_application_gateways_list_available_server_variables_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -421,7 +406,7 @@ def build_application_gateways_list_available_request_headers_request( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -450,7 +435,7 @@ def build_application_gateways_list_available_response_headers_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -479,7 +464,7 @@ def build_application_gateways_list_available_waf_rule_sets_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -508,7 +493,7 @@ def build_application_gateways_list_available_ssl_options_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -537,7 +522,7 @@ def build_application_gateways_list_available_ssl_predefined_policies_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -566,7 +551,7 @@ def build_application_gateways_get_ssl_predefined_policy_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -596,7 +581,7 @@ def build_application_gateway_private_link_resources_list_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -627,7 +612,7 @@ def build_application_gateway_private_endpoint_connections_delete_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -659,7 +644,7 @@ def build_application_gateway_private_endpoint_connections_update_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -694,7 +679,7 @@ def build_application_gateway_private_endpoint_connections_get_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -726,7 +711,7 @@ def build_application_gateway_private_endpoint_connections_list_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -757,7 +742,7 @@ def build_application_gateway_waf_dynamic_manifests_default_get_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -787,7 +772,7 @@ def build_application_gateway_waf_dynamic_manifests_get_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -817,7 +802,7 @@ def build_application_security_groups_delete_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -850,7 +835,7 @@ def build_application_security_groups_get_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -883,7 +868,7 @@ def build_application_security_groups_create_or_update_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -919,7 +904,7 @@ def build_application_security_groups_update_tags_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -955,7 +940,7 @@ def build_application_security_groups_list_all_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -983,7 +968,7 @@ def build_application_security_groups_list_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1011,7 +996,7 @@ def build_available_delegations_list_request(location: str, subscription_id: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1041,7 +1026,7 @@ def build_available_resource_group_delegations_list_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1072,7 +1057,7 @@ def build_available_service_aliases_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1102,7 +1087,7 @@ def build_available_service_aliases_list_by_resource_group_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1133,7 +1118,7 @@ def build_azure_firewalls_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1164,7 +1149,7 @@ def build_azure_firewalls_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1195,7 +1180,7 @@ def build_azure_firewalls_create_or_update_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1231,7 +1216,7 @@ def build_azure_firewalls_update_tags_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1263,7 +1248,7 @@ def build_azure_firewalls_list_request(resource_group_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1291,7 +1276,7 @@ def build_azure_firewalls_list_all_request(subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1317,7 +1302,7 @@ def build_azure_firewalls_list_learned_prefixes_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1348,7 +1333,7 @@ def build_azure_firewalls_packet_capture_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1384,7 +1369,7 @@ def build_azure_firewall_fqdn_tags_list_all_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1412,7 +1397,7 @@ def build_web_categories_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1443,7 +1428,7 @@ def build_web_categories_list_by_subscription_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1469,7 +1454,7 @@ def build_bastion_hosts_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1500,7 +1485,7 @@ def build_bastion_hosts_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1531,7 +1516,7 @@ def build_bastion_hosts_create_or_update_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1565,7 +1550,7 @@ def build_bastion_hosts_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1597,7 +1582,7 @@ def build_bastion_hosts_list_request(subscription_id: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1623,7 +1608,7 @@ def build_bastion_hosts_list_by_resource_group_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1653,7 +1638,7 @@ def build_network_management_put_bastion_shareable_link_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1687,7 +1672,7 @@ def build_network_management_delete_bastion_shareable_link_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1721,7 +1706,7 @@ def build_network_management_delete_bastion_shareable_link_by_token_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1755,7 +1740,7 @@ def build_network_management_get_bastion_shareable_link_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1789,7 +1774,7 @@ def build_network_management_get_active_sessions_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1820,7 +1805,7 @@ def build_network_management_disconnect_active_sessions_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1854,7 +1839,7 @@ def build_network_management_check_dns_name_availability_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1885,7 +1870,7 @@ def build_network_management_express_route_provider_port_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1920,7 +1905,7 @@ def build_network_management_list_active_connectivity_configurations_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1961,7 +1946,7 @@ def build_network_management_list_active_security_admin_rules_request( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2002,7 +1987,7 @@ def build_network_management_list_network_manager_effective_connectivity_configu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2043,7 +2028,7 @@ def build_network_management_list_network_manager_effective_security_admin_rules _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2079,7 +2064,7 @@ def build_network_management_supported_security_providers_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2110,7 +2095,7 @@ def build_network_management_generatevirtualwanvpnserverconfigurationvpnprofile_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2144,7 +2129,7 @@ def build_network_interfaces_list_cloud_service_role_instance_network_interfaces _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2176,7 +2161,7 @@ def build_network_interfaces_list_cloud_service_network_interfaces_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2214,7 +2199,7 @@ def build_network_interfaces_get_cloud_service_network_interface_request( # pyl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2249,7 +2234,7 @@ def build_network_interfaces_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2285,7 +2270,7 @@ def build_network_interfaces_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2318,7 +2303,7 @@ def build_network_interfaces_create_or_update_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2352,7 +2337,7 @@ def build_network_interfaces_update_tags_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2386,7 +2371,7 @@ def build_network_interfaces_list_all_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2410,7 +2395,7 @@ def build_network_interfaces_list_request(resource_group_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2440,7 +2425,7 @@ def build_network_interfaces_get_effective_route_table_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2471,7 +2456,7 @@ def build_network_interfaces_list_effective_network_security_groups_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2707,7 +2692,7 @@ def build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2744,7 +2729,7 @@ def build_public_ip_addresses_list_cloud_service_role_instance_public_ip_address _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2787,7 +2772,7 @@ def build_public_ip_addresses_get_cloud_service_public_ip_address_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2824,7 +2809,7 @@ def build_public_ip_addresses_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2860,7 +2845,7 @@ def build_public_ip_addresses_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2893,7 +2878,7 @@ def build_public_ip_addresses_create_or_update_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2927,7 +2912,7 @@ def build_public_ip_addresses_update_tags_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2961,7 +2946,7 @@ def build_public_ip_addresses_list_all_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2987,7 +2972,7 @@ def build_public_ip_addresses_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3017,7 +3002,7 @@ def build_public_ip_addresses_ddos_protection_status_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3170,7 +3155,7 @@ def build_vip_swap_get_request(group_name: str, resource_name: str, subscription _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3203,7 +3188,7 @@ def build_vip_swap_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3238,7 +3223,7 @@ def build_vip_swap_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3269,7 +3254,7 @@ def build_custom_ip_prefixes_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3305,7 +3290,7 @@ def build_custom_ip_prefixes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3338,7 +3323,7 @@ def build_custom_ip_prefixes_create_or_update_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3372,7 +3357,7 @@ def build_custom_ip_prefixes_update_tags_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3406,7 +3391,7 @@ def build_custom_ip_prefixes_list_all_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3430,7 +3415,7 @@ def build_custom_ip_prefixes_list_request(resource_group_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3460,7 +3445,7 @@ def build_ddos_custom_policies_delete_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3491,7 +3476,7 @@ def build_ddos_custom_policies_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3522,7 +3507,7 @@ def build_ddos_custom_policies_create_or_update_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3556,7 +3541,7 @@ def build_ddos_custom_policies_update_tags_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3590,7 +3575,7 @@ def build_ddos_protection_plans_delete_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3621,7 +3606,7 @@ def build_ddos_protection_plans_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3652,7 +3637,7 @@ def build_ddos_protection_plans_create_or_update_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3686,7 +3671,7 @@ def build_ddos_protection_plans_update_tags_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3718,7 +3703,7 @@ def build_ddos_protection_plans_list_request(subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3744,7 +3729,7 @@ def build_ddos_protection_plans_list_by_resource_group_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3774,7 +3759,7 @@ def build_dscp_configuration_create_or_update_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -3808,7 +3793,7 @@ def build_dscp_configuration_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3839,7 +3824,7 @@ def build_dscp_configuration_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3868,7 +3853,7 @@ def build_dscp_configuration_list_request(resource_group_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3898,7 +3883,7 @@ def build_dscp_configuration_list_all_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3924,7 +3909,7 @@ def build_available_endpoint_services_list_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3954,7 +3939,7 @@ def build_express_route_circuit_authorizations_delete_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3986,7 +3971,7 @@ def build_express_route_circuit_authorizations_get_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4018,7 +4003,7 @@ def build_express_route_circuit_authorizations_create_or_update_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4053,7 +4038,7 @@ def build_express_route_circuit_authorizations_list_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4084,7 +4069,7 @@ def build_express_route_circuit_peerings_delete_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4116,7 +4101,7 @@ def build_express_route_circuit_peerings_get_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4148,7 +4133,7 @@ def build_express_route_circuit_peerings_create_or_update_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4183,7 +4168,7 @@ def build_express_route_circuit_peerings_list_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4219,7 +4204,7 @@ def build_express_route_circuit_connections_delete_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4257,7 +4242,7 @@ def build_express_route_circuit_connections_get_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4295,7 +4280,7 @@ def build_express_route_circuit_connections_create_or_update_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4331,7 +4316,7 @@ def build_express_route_circuit_connections_list_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4368,7 +4353,7 @@ def build_peer_express_route_circuit_connections_get_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4401,7 +4386,7 @@ def build_peer_express_route_circuit_connections_list_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4433,7 +4418,7 @@ def build_express_route_circuits_delete_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4464,7 +4449,7 @@ def build_express_route_circuits_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4495,7 +4480,7 @@ def build_express_route_circuits_create_or_update_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4529,7 +4514,7 @@ def build_express_route_circuits_update_tags_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4568,7 +4553,7 @@ def build_express_route_circuits_list_arp_table_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4606,7 +4591,7 @@ def build_express_route_circuits_list_routes_table_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4644,7 +4629,7 @@ def build_express_route_circuits_list_routes_table_summary_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4677,7 +4662,7 @@ def build_express_route_circuits_get_stats_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4708,7 +4693,7 @@ def build_express_route_circuits_get_peering_stats_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4740,7 +4725,7 @@ def build_express_route_circuits_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4770,7 +4755,7 @@ def build_express_route_circuits_list_all_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4798,7 +4783,7 @@ def build_express_route_service_providers_list_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4826,7 +4811,7 @@ def build_express_route_cross_connections_list_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4856,7 +4841,7 @@ def build_express_route_cross_connections_list_by_resource_group_request( # pyl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4886,7 +4871,7 @@ def build_express_route_cross_connections_get_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -4917,7 +4902,7 @@ def build_express_route_cross_connections_create_or_update_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4951,7 +4936,7 @@ def build_express_route_cross_connections_update_tags_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -4990,7 +4975,7 @@ def build_express_route_cross_connections_list_arp_table_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5028,7 +5013,7 @@ def build_express_route_cross_connections_list_routes_table_summary_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5066,7 +5051,7 @@ def build_express_route_cross_connections_list_routes_table_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5099,7 +5084,7 @@ def build_express_route_cross_connection_peerings_list_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5130,7 +5115,7 @@ def build_express_route_cross_connection_peerings_delete_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5162,7 +5147,7 @@ def build_express_route_cross_connection_peerings_get_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5194,7 +5179,7 @@ def build_express_route_cross_connection_peerings_create_or_update_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5229,7 +5214,7 @@ def build_express_route_ports_locations_list_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5257,7 +5242,7 @@ def build_express_route_ports_locations_get_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5287,7 +5272,7 @@ def build_express_route_ports_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5318,7 +5303,7 @@ def build_express_route_ports_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5349,7 +5334,7 @@ def build_express_route_ports_create_or_update_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5383,7 +5368,7 @@ def build_express_route_ports_update_tags_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5417,7 +5402,7 @@ def build_express_route_ports_list_by_resource_group_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5445,7 +5430,7 @@ def build_express_route_ports_list_request(subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5471,7 +5456,7 @@ def build_express_route_ports_generate_loa_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5505,7 +5490,7 @@ def build_express_route_links_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5537,7 +5522,7 @@ def build_express_route_links_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5568,7 +5553,7 @@ def build_express_route_port_authorizations_delete_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5600,7 +5585,7 @@ def build_express_route_port_authorizations_get_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5632,7 +5617,7 @@ def build_express_route_port_authorizations_create_or_update_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5667,7 +5652,7 @@ def build_express_route_port_authorizations_list_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5698,7 +5683,7 @@ def build_express_route_provider_ports_location_list_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5728,7 +5713,7 @@ def build_firewall_policies_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5764,7 +5749,7 @@ def build_firewall_policies_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5797,7 +5782,7 @@ def build_firewall_policies_create_or_update_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5831,7 +5816,7 @@ def build_firewall_policies_update_tags_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -5863,7 +5848,7 @@ def build_firewall_policies_list_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5891,7 +5876,7 @@ def build_firewall_policies_list_all_request(subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5921,7 +5906,7 @@ def build_firewall_policy_rule_collection_groups_delete_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5957,7 +5942,7 @@ def build_firewall_policy_rule_collection_groups_get_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -5993,7 +5978,7 @@ def build_firewall_policy_rule_collection_groups_create_or_update_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6028,7 +6013,7 @@ def build_firewall_policy_rule_collection_groups_list_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6059,7 +6044,7 @@ def build_firewall_policy_idps_signatures_list_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6093,7 +6078,7 @@ def build_firewall_policy_idps_signatures_overrides_patch_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6127,7 +6112,7 @@ def build_firewall_policy_idps_signatures_overrides_put_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6161,7 +6146,7 @@ def build_firewall_policy_idps_signatures_overrides_get_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6192,7 +6177,7 @@ def build_firewall_policy_idps_signatures_overrides_list_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6223,7 +6208,7 @@ def build_firewall_policy_idps_signatures_filter_values_list_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6257,7 +6242,7 @@ def build_firewall_policy_drafts_create_or_update_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6293,7 +6278,7 @@ def build_firewall_policy_drafts_delete_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6326,7 +6311,7 @@ def build_firewall_policy_drafts_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6359,7 +6344,7 @@ def build_firewall_policy_deployments_deploy_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6396,7 +6381,7 @@ def build_firewall_policy_rule_collection_group_drafts_delete_request( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6436,7 +6421,7 @@ def build_firewall_policy_rule_collection_group_drafts_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6479,7 +6464,7 @@ def build_firewall_policy_rule_collection_group_drafts_get_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6509,13 +6494,511 @@ def build_firewall_policy_rule_collection_group_drafts_get_request( # pylint: d return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_ipam_pools_list_request( + resource_group_name: str, + network_manager_name: str, + subscription_id: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if skip_token is not None: + _params["skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if skip is not None: + _params["skip"] = _SERIALIZER.query("skip", skip, "int") + if top is not None: + _params["top"] = _SERIALIZER.query("top", top, "int") + if sort_key is not None: + _params["sortKey"] = _SERIALIZER.query("sort_key", sort_key, "str") + if sort_value is not None: + _params["sortValue"] = _SERIALIZER.query("sort_value", sort_value, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_create_request( + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_update_request( + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_get_request( + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_delete_request( + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_get_pool_usage_request( + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/getPoolUsage", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ipam_pools_list_associated_resources_request( # pylint: disable=name-too-long + resource_group_name: str, network_manager_name: str, pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/listAssociatedResources", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_static_cidrs_list_request( + resource_group_name: str, + network_manager_name: str, + pool_name: str, + subscription_id: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if skip_token is not None: + _params["skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if skip is not None: + _params["skip"] = _SERIALIZER.query("skip", skip, "int") + if top is not None: + _params["top"] = _SERIALIZER.query("top", top, "int") + if sort_key is not None: + _params["sortKey"] = _SERIALIZER.query("sort_key", sort_key, "str") + if sort_value is not None: + _params["sortValue"] = _SERIALIZER.query("sort_value", sort_value, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_static_cidrs_create_request( + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "staticCidrName": _SERIALIZER.url( + "static_cidr_name", static_cidr_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_static_cidrs_get_request( + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "staticCidrName": _SERIALIZER.url( + "static_cidr_name", static_cidr_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_static_cidrs_delete_request( + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "staticCidrName": _SERIALIZER.url( + "static_cidr_name", static_cidr_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + def build_ip_allocations_delete_request( resource_group_name: str, ip_allocation_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6551,7 +7034,7 @@ def build_ip_allocations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6584,7 +7067,7 @@ def build_ip_allocations_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6618,7 +7101,7 @@ def build_ip_allocations_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6650,7 +7133,7 @@ def build_ip_allocations_list_request(subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6676,7 +7159,7 @@ def build_ip_allocations_list_by_resource_group_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6706,7 +7189,7 @@ def build_ip_groups_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6739,7 +7222,7 @@ def build_ip_groups_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6773,7 +7256,7 @@ def build_ip_groups_update_groups_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6807,7 +7290,7 @@ def build_ip_groups_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6838,7 +7321,7 @@ def build_ip_groups_list_by_resource_group_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6866,7 +7349,7 @@ def build_ip_groups_list_request(subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6892,7 +7375,7 @@ def build_load_balancers_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6928,7 +7411,7 @@ def build_load_balancers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -6961,7 +7444,7 @@ def build_load_balancers_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -6995,7 +7478,7 @@ def build_load_balancers_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7027,7 +7510,7 @@ def build_load_balancers_list_all_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7051,7 +7534,7 @@ def build_load_balancers_list_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7081,7 +7564,7 @@ def build_load_balancers_swap_public_ip_addresses_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7114,7 +7597,7 @@ def build_load_balancers_list_inbound_nat_rule_port_mappings_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7149,7 +7632,7 @@ def build_load_balancers_migrate_to_ip_based_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7185,7 +7668,7 @@ def build_load_balancer_backend_address_pools_list_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7220,7 +7703,7 @@ def build_load_balancer_backend_address_pools_get_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7256,7 +7739,7 @@ def build_load_balancer_backend_address_pools_create_or_update_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7295,7 +7778,7 @@ def build_load_balancer_backend_address_pools_delete_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7327,7 +7810,7 @@ def build_load_balancer_frontend_ip_configurations_list_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7362,7 +7845,7 @@ def build_load_balancer_frontend_ip_configurations_get_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7396,7 +7879,7 @@ def build_inbound_nat_rules_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7427,7 +7910,7 @@ def build_inbound_nat_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7465,7 +7948,7 @@ def build_inbound_nat_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7499,7 +7982,7 @@ def build_inbound_nat_rules_create_or_update_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7534,7 +8017,7 @@ def build_load_balancer_load_balancing_rules_list_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7569,7 +8052,7 @@ def build_load_balancer_load_balancing_rules_get_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7595,13 +8078,49 @@ def build_load_balancer_load_balancing_rules_get_request( # pylint: disable=nam return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_load_balancer_load_balancing_rules_health_request( # pylint: disable=name-too-long + group_name: str, load_balancer_name: str, load_balancing_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health", + ) # pylint: disable=line-too-long + path_format_arguments = { + "groupName": _SERIALIZER.url("group_name", group_name, "str", pattern=r"^[a-z][a-z0-9]*$"), + "loadBalancerName": _SERIALIZER.url( + "load_balancer_name", load_balancer_name, "str", pattern=r"^[a-z][a-z0-9]*$" + ), + "loadBalancingRuleName": _SERIALIZER.url( + "load_balancing_rule_name", load_balancing_rule_name, "str", pattern=r"^[a-z][a-z0-9]*$" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_load_balancer_outbound_rules_list_request( # pylint: disable=name-too-long resource_group_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7632,7 +8151,7 @@ def build_load_balancer_outbound_rules_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7664,7 +8183,7 @@ def build_load_balancer_network_interfaces_list_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7695,7 +8214,7 @@ def build_load_balancer_probes_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7726,7 +8245,7 @@ def build_load_balancer_probes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7758,7 +8277,7 @@ def build_nat_gateways_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7794,7 +8313,7 @@ def build_nat_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7827,7 +8346,7 @@ def build_nat_gateways_create_or_update_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7861,7 +8380,7 @@ def build_nat_gateways_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -7893,7 +8412,7 @@ def build_nat_gateways_list_all_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7917,7 +8436,7 @@ def build_nat_gateways_list_request(resource_group_name: str, subscription_id: s _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7947,7 +8466,7 @@ def build_network_interface_ip_configurations_list_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -7982,7 +8501,7 @@ def build_network_interface_ip_configurations_get_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8014,7 +8533,7 @@ def build_network_interface_load_balancers_list_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8049,7 +8568,7 @@ def build_network_interface_tap_configurations_delete_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8085,7 +8604,7 @@ def build_network_interface_tap_configurations_get_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8121,7 +8640,7 @@ def build_network_interface_tap_configurations_create_or_update_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8156,7 +8675,7 @@ def build_network_interface_tap_configurations_list_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8187,7 +8706,7 @@ def build_network_managers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8198,7 +8717,12 @@ def build_network_managers_get_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8218,7 +8742,7 @@ def build_network_managers_create_or_update_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8230,7 +8754,12 @@ def build_network_managers_create_or_update_request( # pylint: disable=name-too path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8257,7 +8786,7 @@ def build_network_managers_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8268,7 +8797,12 @@ def build_network_managers_delete_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8290,7 +8824,7 @@ def build_network_managers_patch_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8302,7 +8836,12 @@ def build_network_managers_patch_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8324,7 +8863,7 @@ def build_network_managers_list_by_subscription_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8359,7 +8898,7 @@ def build_network_managers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8393,7 +8932,7 @@ def build_network_manager_commits_post_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8405,7 +8944,12 @@ def build_network_manager_commits_post_request( # pylint: disable=name-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8432,7 +8976,7 @@ def build_network_manager_deployment_status_list_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8444,7 +8988,12 @@ def build_network_manager_deployment_status_list_request( # pylint: disable=nam path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -8468,7 +9017,7 @@ def build_subscription_network_manager_connections_create_or_update_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8503,7 +9052,7 @@ def build_subscription_network_manager_connections_get_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8535,7 +9084,7 @@ def build_subscription_network_manager_connections_delete_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8567,7 +9116,7 @@ def build_subscription_network_manager_connections_list_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8599,7 +9148,7 @@ def build_management_group_network_manager_connections_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8634,7 +9183,7 @@ def build_management_group_network_manager_connections_get_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8666,7 +9215,7 @@ def build_management_group_network_manager_connections_delete_request( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8698,7 +9247,7 @@ def build_management_group_network_manager_connections_list_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8731,7 +9280,7 @@ def build_connectivity_configurations_get_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8763,7 +9312,7 @@ def build_connectivity_configurations_create_or_update_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8804,7 +9353,7 @@ def build_connectivity_configurations_delete_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8844,7 +9393,7 @@ def build_connectivity_configurations_list_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8879,7 +9428,7 @@ def build_network_groups_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -8917,7 +9466,7 @@ def build_network_groups_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -8960,7 +9509,7 @@ def build_network_groups_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -9000,7 +9549,7 @@ def build_network_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -9040,7 +9589,7 @@ def build_static_members_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -9078,7 +9627,7 @@ def build_static_members_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -9119,7 +9668,7 @@ def build_static_members_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -9159,7 +9708,7 @@ def build_static_members_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -9189,60 +9738,76 @@ def build_static_members_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_connections_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any +def build_network_manager_routing_configurations_list_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=20, minimum=1) + if skip_token is not None: + _params["$skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_connections_get_request( - resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any +def build_network_manager_routing_configurations_get_request( # pylint: disable=name-too-long + resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9256,25 +9821,32 @@ def build_scope_connections_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_connections_delete_request( - resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any +def build_network_manager_routing_configurations_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9283,55 +9855,63 @@ def build_scope_connections_delete_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_connections_list_request( +def build_network_manager_routing_configurations_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, + configuration_name: str, subscription_id: str, *, - top: Optional[int] = None, - skip_token: Optional[str] = None, + force: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=20, minimum=1) - if skip_token is not None: - _params["$skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if force is not None: + _params["force"] = _SERIALIZER.query("force", force, "bool") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_admin_configurations_list_request( # pylint: disable=name-too-long +def build_routing_rule_collections_list_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, + configuration_name: str, subscription_id: str, *, top: Optional[int] = None, @@ -9341,18 +9921,25 @@ def build_security_admin_configurations_list_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9370,25 +9957,39 @@ def build_security_admin_configurations_list_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_admin_configurations_get_request( # pylint: disable=name-too-long - resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any +def build_routing_rule_collections_get_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9402,26 +10003,40 @@ def build_security_admin_configurations_get_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_admin_configurations_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any +def build_routing_rule_collections_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9437,10 +10052,11 @@ def build_security_admin_configurations_create_or_update_request( # pylint: dis return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_admin_configurations_delete_request( # pylint: disable=name-too-long +def build_routing_rule_collections_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, subscription_id: str, *, force: Optional[bool] = None, @@ -9449,19 +10065,28 @@ def build_security_admin_configurations_delete_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9477,10 +10102,11 @@ def build_security_admin_configurations_delete_request( # pylint: disable=name- return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rule_collections_list_request( # pylint: disable=name-too-long +def build_routing_rules_list_request( resource_group_name: str, network_manager_name: str, configuration_name: str, + rule_collection_name: str, subscription_id: str, *, top: Optional[int] = None, @@ -9490,19 +10116,28 @@ def build_admin_rule_collections_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9520,31 +10155,41 @@ def build_admin_rule_collections_list_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rule_collections_get_request( +def build_routing_rules_get_request( resource_group_name: str, network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9558,32 +10203,42 @@ def build_admin_rule_collections_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rule_collections_create_or_update_request( # pylint: disable=name-too-long +def build_routing_rules_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9599,11 +10254,12 @@ def build_admin_rule_collections_create_or_update_request( # pylint: disable=na return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rule_collections_delete_request( # pylint: disable=name-too-long +def build_routing_rules_delete_request( resource_group_name: str, network_manager_name: str, configuration_name: str, rule_collection_name: str, + rule_name: str, subscription_id: str, *, force: Optional[bool] = None, @@ -9612,20 +10268,29 @@ def build_admin_rule_collections_delete_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "configurationName": _SERIALIZER.url( + "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleCollectionName": _SERIALIZER.url( + "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + ), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9641,78 +10306,70 @@ def build_admin_rule_collections_delete_request( # pylint: disable=name-too-lon return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rules_list_request( - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any +def build_scope_connections_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=20, minimum=1) - if skip_token is not None: - _params["$skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rules_get_request( - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - subscription_id: str, - **kwargs: Any +def build_scope_connections_get_request( + resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9726,34 +10383,30 @@ def build_admin_rules_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rules_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - subscription_id: str, - **kwargs: Any +def build_scope_connections_delete_request( + resource_group_name: str, network_manager_name: str, scope_connection_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "scopeConnectionName": _SERIALIZER.url("scope_connection_name", scope_connection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9762,58 +10415,58 @@ def build_admin_rules_create_or_update_request( # pylint: disable=name-too-long _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_admin_rules_delete_request( +def build_scope_connections_list_request( resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, subscription_id: str, *, - force: Optional[bool] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections", ) # 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"), - "networkManagerName": _SERIALIZER.url("network_manager_name", network_manager_name, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if force is not None: - _params["force"] = _SERIALIZER.query("force", force, "bool") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=20, minimum=1) + if skip_token is not None: + _params["$skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_configurations_list_request( # pylint: disable=name-too-long +def build_security_admin_configurations_list_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, subscription_id: str, @@ -9825,21 +10478,22 @@ def build_security_user_configurations_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), } @@ -9858,31 +10512,30 @@ def build_security_user_configurations_list_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_configurations_get_request( # pylint: disable=name-too-long +def build_security_admin_configurations_get_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9896,32 +10549,31 @@ def build_security_user_configurations_get_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_configurations_create_or_update_request( # pylint: disable=name-too-long +def build_security_admin_configurations_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9937,7 +10589,7 @@ def build_security_user_configurations_create_or_update_request( # pylint: disa return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_configurations_delete_request( # pylint: disable=name-too-long +def build_security_admin_configurations_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -9949,25 +10601,24 @@ def build_security_user_configurations_delete_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -9983,7 +10634,7 @@ def build_security_user_configurations_delete_request( # pylint: disable=name-t return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rule_collections_list_request( # pylint: disable=name-too-long +def build_admin_rule_collections_list_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -9996,25 +10647,24 @@ def build_security_user_rule_collections_list_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10032,7 +10682,7 @@ def build_security_user_rule_collections_list_request( # pylint: disable=name-t return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rule_collections_get_request( # pylint: disable=name-too-long +def build_admin_rule_collections_get_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10043,28 +10693,25 @@ def build_security_user_rule_collections_get_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10078,7 +10725,7 @@ def build_security_user_rule_collections_get_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rule_collections_create_or_update_request( # pylint: disable=name-too-long +def build_admin_rule_collections_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10089,29 +10736,26 @@ def build_security_user_rule_collections_create_or_update_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10127,7 +10771,7 @@ def build_security_user_rule_collections_create_or_update_request( # pylint: di return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rule_collections_delete_request( # pylint: disable=name-too-long +def build_admin_rule_collections_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10140,28 +10784,25 @@ def build_security_user_rule_collections_delete_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10177,7 +10818,7 @@ def build_security_user_rule_collections_delete_request( # pylint: disable=name return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rules_list_request( +def build_admin_rules_list_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10191,28 +10832,25 @@ def build_security_user_rules_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10230,7 +10868,7 @@ def build_security_user_rules_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rules_get_request( +def build_admin_rules_get_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10242,29 +10880,26 @@ def build_security_user_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10278,7 +10913,7 @@ def build_security_user_rules_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rules_create_or_update_request( # pylint: disable=name-too-long +def build_admin_rules_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10290,30 +10925,27 @@ def build_security_user_rules_create_or_update_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10329,7 +10961,7 @@ def build_security_user_rules_create_or_update_request( # pylint: disable=name- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_security_user_rules_delete_request( +def build_admin_rules_delete_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10343,29 +10975,26 @@ def build_security_user_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # 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", max_length=90, min_length=1 - ), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "networkManagerName": _SERIALIZER.url( - "network_manager_name", network_manager_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "configurationName": _SERIALIZER.url( - "configuration_name", configuration_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleCollectionName": _SERIALIZER.url( - "rule_collection_name", rule_collection_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$" - ), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"^[a-zA-Z0-9_.-]*$"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -10381,7 +11010,7 @@ def build_security_user_rules_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_manager_routing_configurations_list_request( # pylint: disable=name-too-long +def build_security_user_configurations_list_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, subscription_id: str, @@ -10393,13 +11022,13 @@ def build_network_manager_routing_configurations_list_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10426,19 +11055,19 @@ def build_network_manager_routing_configurations_list_request( # pylint: disabl return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_manager_routing_configurations_get_request( # pylint: disable=name-too-long +def build_security_user_configurations_get_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10464,20 +11093,20 @@ def build_network_manager_routing_configurations_get_request( # pylint: disable return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_manager_routing_configurations_create_or_update_request( # pylint: disable=name-too-long +def build_security_user_configurations_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10505,7 +11134,7 @@ def build_network_manager_routing_configurations_create_or_update_request( # py return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_manager_routing_configurations_delete_request( # pylint: disable=name-too-long +def build_security_user_configurations_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10517,13 +11146,13 @@ def build_network_manager_routing_configurations_delete_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10551,7 +11180,7 @@ def build_network_manager_routing_configurations_delete_request( # pylint: disa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rule_collections_list_request( # pylint: disable=name-too-long +def build_security_user_rule_collections_list_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10564,13 +11193,13 @@ def build_routing_rule_collections_list_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10600,7 +11229,7 @@ def build_routing_rule_collections_list_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rule_collections_get_request( # pylint: disable=name-too-long +def build_security_user_rule_collections_get_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10611,13 +11240,13 @@ def build_routing_rule_collections_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10646,7 +11275,7 @@ def build_routing_rule_collections_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rule_collections_create_or_update_request( # pylint: disable=name-too-long +def build_security_user_rule_collections_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10657,14 +11286,14 @@ def build_routing_rule_collections_create_or_update_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10695,7 +11324,7 @@ def build_routing_rule_collections_create_or_update_request( # pylint: disable= return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rule_collections_delete_request( # pylint: disable=name-too-long +def build_security_user_rule_collections_delete_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10708,13 +11337,13 @@ def build_routing_rule_collections_delete_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10745,7 +11374,7 @@ def build_routing_rule_collections_delete_request( # pylint: disable=name-too-l return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rules_list_request( +def build_security_user_rules_list_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10759,13 +11388,13 @@ def build_routing_rules_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10798,7 +11427,7 @@ def build_routing_rules_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rules_get_request( +def build_security_user_rules_get_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10810,13 +11439,13 @@ def build_routing_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10846,7 +11475,7 @@ def build_routing_rules_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rules_create_or_update_request( # pylint: disable=name-too-long +def build_security_user_rules_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10858,14 +11487,14 @@ def build_routing_rules_create_or_update_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10897,7 +11526,7 @@ def build_routing_rules_create_or_update_request( # pylint: disable=name-too-lo return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_routing_rules_delete_request( +def build_security_user_rules_delete_request( resource_group_name: str, network_manager_name: str, configuration_name: str, @@ -10911,13 +11540,13 @@ def build_routing_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -10955,7 +11584,7 @@ def build_network_profiles_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -10991,7 +11620,7 @@ def build_network_profiles_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11024,7 +11653,7 @@ def build_network_profiles_create_or_update_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -11058,7 +11687,7 @@ def build_network_profiles_update_tags_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -11090,7 +11719,7 @@ def build_network_profiles_list_all_request(subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11114,7 +11743,7 @@ def build_network_profiles_list_request(resource_group_name: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11144,7 +11773,7 @@ def build_network_security_groups_delete_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11180,7 +11809,7 @@ def build_network_security_groups_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11213,7 +11842,7 @@ def build_network_security_groups_create_or_update_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -11247,7 +11876,7 @@ def build_network_security_groups_update_tags_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -11281,7 +11910,7 @@ def build_network_security_groups_list_all_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11309,7 +11938,7 @@ def build_network_security_groups_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11343,7 +11972,7 @@ def build_security_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11379,7 +12008,7 @@ def build_security_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11415,7 +12044,7 @@ def build_security_rules_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -11450,7 +12079,7 @@ def build_security_rules_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11481,7 +12110,7 @@ def build_default_security_rules_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11516,7 +12145,7 @@ def build_default_security_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -11542,72 +12171,108 @@ def build_default_security_rules_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_delete_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_intents_list_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + subscription_id: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if skip_token is not None: + _params["skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if skip is not None: + _params["skip"] = _SERIALIZER.query("skip", skip, "int") + if top is not None: + _params["top"] = _SERIALIZER.query("top", top, "int") + if sort_key is not None: + _params["sortKey"] = _SERIALIZER.query("sort_key", sort_key, "str") + if sort_value is not None: + _params["sortValue"] = _SERIALIZER.query("sort_value", sort_value, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_get_request( # pylint: disable=name-too-long +def build_reachability_analysis_intents_get_request( # pylint: disable=name-too-long resource_group_name: str, - network_virtual_appliance_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, subscription_id: str, - *, - expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisIntentName": _SERIALIZER.url( + "reachability_analysis_intent_name", + reachability_analysis_intent_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -11615,26 +12280,43 @@ def build_network_virtual_appliances_get_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_update_tags_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_intents_create_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisIntentName": _SERIALIZER.url( + "reachability_analysis_intent_name", + reachability_analysis_intent_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), } @@ -11648,30 +12330,46 @@ def build_network_virtual_appliances_update_tags_request( # pylint: disable=nam _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_intents_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisIntentName": _SERIALIZER.url( + "reachability_analysis_intent_name", + reachability_analysis_intent_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11680,66 +12378,107 @@ def build_network_virtual_appliances_create_or_update_request( # pylint: disabl _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_restart_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_runs_list_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + subscription_id: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if skip_token is not None: + _params["skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if skip is not None: + _params["skip"] = _SERIALIZER.query("skip", skip, "int") + if top is not None: + _params["top"] = _SERIALIZER.query("top", top, "int") + if sort_key is not None: + _params["sortKey"] = _SERIALIZER.query("sort_key", sort_key, "str") + if sort_value is not None: + _params["sortValue"] = _SERIALIZER.query("sort_value", sort_value, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_runs_get_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", ) # 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"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisRunName": _SERIALIZER.url( + "reachability_analysis_run_name", + reachability_analysis_run_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11753,21 +12492,44 @@ def build_network_virtual_appliances_list_by_resource_group_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_virtual_appliances_list_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any +def build_reachability_analysis_runs_create_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances" - ) + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", + ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisRunName": _SERIALIZER.url( + "reachability_analysis_run_name", + reachability_analysis_run_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11776,32 +12538,50 @@ def build_network_virtual_appliances_list_request( # pylint: disable=name-too-l _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_sites_delete_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any +def build_reachability_analysis_runs_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), + "reachabilityAnalysisRunName": _SERIALIZER.url( + "reachability_analysis_run_name", + reachability_analysis_run_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "siteName": _SERIALIZER.url("site_name", site_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11815,33 +12595,54 @@ def build_virtual_appliance_sites_delete_request( # pylint: disable=name-too-lo return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_sites_get_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any +def build_verifier_workspaces_list_request( + resource_group_name: str, + network_manager_name: str, + subscription_id: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", ), - "siteName": _SERIALIZER.url("site_name", site_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if skip_token is not None: + _params["skipToken"] = _SERIALIZER.query("skip_token", skip_token, "str") + if skip is not None: + _params["skip"] = _SERIALIZER.query("skip", skip, "int") + if top is not None: + _params["top"] = _SERIALIZER.query("top", top, "int") + if sort_key is not None: + _params["sortKey"] = _SERIALIZER.query("sort_key", sort_key, "str") + if sort_value is not None: + _params["sortValue"] = _SERIALIZER.query("sort_value", sort_value, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -11849,28 +12650,32 @@ def build_virtual_appliance_sites_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_sites_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any +def build_verifier_workspaces_get_request( + resource_group_name: str, network_manager_name: str, workspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" ), - "siteName": _SERIALIZER.url("site_name", site_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11879,33 +12684,38 @@ def build_virtual_appliance_sites_create_or_update_request( # pylint: disable=n _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_sites_list_request( # pylint: disable=name-too-long - resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any +def build_verifier_workspaces_create_request( + resource_group_name: str, network_manager_name: str, workspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", ) # 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" + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11914,26 +12724,40 @@ def build_virtual_appliance_sites_list_request( # pylint: disable=name-too-long _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_skus_list_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any +def build_verifier_workspaces_update_request( + resource_group_name: str, network_manager_name: str, workspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus" + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", ) # 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"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11942,26 +12766,39 @@ def build_virtual_appliance_skus_list_request( # pylint: disable=name-too-long _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_appliance_skus_get_request(sku_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_verifier_workspaces_delete_request( + resource_group_name: str, network_manager_name: str, workspace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}", ) # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "skuName": _SERIALIZER.url("sku_name", sku_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkManagerName": _SERIALIZER.url( + "network_manager_name", + network_manager_name, + "str", + pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$", + ), + "workspaceName": _SERIALIZER.url( + "workspace_name", workspace_name, "str", pattern=r"^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -11972,34 +12809,28 @@ def build_virtual_appliance_skus_get_request(sku_name: str, subscription_id: str # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_inbound_security_rule_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - network_virtual_appliance_name: str, - rule_collection_name: str, - subscription_id: str, - **kwargs: Any +def build_network_virtual_appliances_delete_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}", + "/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" ), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12009,37 +12840,35 @@ def build_inbound_security_rule_create_or_update_request( # pylint: disable=nam _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_inbound_security_rule_get_request( +def build_network_virtual_appliances_get_request( # pylint: disable=name-too-long resource_group_name: str, network_virtual_appliance_name: str, - rule_collection_name: str, subscription_id: str, + *, + expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}", + "/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" ), - "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12047,6 +12876,8 @@ def build_inbound_security_rule_get_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -12054,25 +12885,27 @@ def build_inbound_security_rule_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_network_virtual_appliances_update_tags_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, "str"), "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: str = _url.format(**path_format_arguments) # type: ignore @@ -12085,26 +12918,29 @@ def build_network_watchers_create_or_update_request( # pylint: disable=name-too _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_get_request( - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_network_virtual_appliances_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, "str"), + "networkVirtualApplianceName": _SERIALIZER.url( + "network_virtual_appliance_name", network_virtual_appliance_name, "str" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12114,28 +12950,33 @@ def build_network_watchers_get_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_delete_request( - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_network_virtual_appliances_restart_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart", ) # 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"), + "networkVirtualApplianceName": _SERIALIZER.url( + "network_virtual_appliance_name", network_virtual_appliance_name, "str" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12145,29 +12986,29 @@ def build_network_watchers_delete_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_update_tags_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_network_virtual_appliances_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12177,27 +13018,25 @@ def build_network_watchers_update_tags_request( # pylint: disable=name-too-long _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_network_virtual_appliances_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers", - ) # pylint: disable=line-too-long + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances" + ) path_format_arguments = { - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12212,16 +13051,26 @@ def build_network_watchers_list_request(resource_group_name: str, subscription_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_list_all_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_virtual_appliance_sites_delete_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers") + _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"), } @@ -12233,27 +13082,29 @@ def build_network_watchers_list_all_request(subscription_id: str, **kwargs: Any) # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_get_topology_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_virtual_appliance_sites_get_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_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"), } @@ -12263,31 +13114,32 @@ def build_network_watchers_get_topology_request( # pylint: disable=name-too-lon _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_verify_ip_flow_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_virtual_appliance_sites_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, site_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_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"), } @@ -12301,27 +13153,28 @@ def build_network_watchers_verify_ip_flow_request( # pylint: disable=name-too-l _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_get_next_hop_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_virtual_appliance_sites_list_request( # pylint: disable=name-too-long + resource_group_name: str, network_virtual_appliance_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop", + "/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"), - "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, "str"), + "networkVirtualApplianceName": _SERIALIZER.url( + "network_virtual_appliance_name", network_virtual_appliance_name, "str" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -12331,31 +13184,448 @@ def build_network_watchers_get_next_hop_request( # pylint: disable=name-too-lon _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_network_watchers_get_vm_security_rules_request( # pylint: disable=name-too-long - resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +def build_virtual_appliance_skus_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView", + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus" ) # 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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_virtual_appliance_skus_get_request(sku_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_inbound_security_rule_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_inbound_security_rule_get_request( + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_get_request( + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_delete_request( + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_update_tags_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_list_all_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_get_topology_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_verify_ip_flow_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_get_next_hop_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_watchers_get_vm_security_rules_request( # pylint: disable=name-too-long + resource_group_name: str, network_watcher_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("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"), } @@ -12378,7 +13648,7 @@ def build_network_watchers_get_troubleshooting_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12412,7 +13682,7 @@ def build_network_watchers_get_troubleshooting_result_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12446,7 +13716,7 @@ def build_network_watchers_set_flow_log_configuration_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12480,7 +13750,7 @@ def build_network_watchers_get_flow_log_status_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12514,7 +13784,7 @@ def build_network_watchers_check_connectivity_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12548,7 +13818,7 @@ def build_network_watchers_get_azure_reachability_report_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12582,7 +13852,7 @@ def build_network_watchers_list_available_providers_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12616,7 +13886,7 @@ def build_network_watchers_get_network_configuration_diagnostic_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12650,7 +13920,7 @@ def build_packet_captures_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12685,7 +13955,7 @@ def build_packet_captures_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12717,7 +13987,7 @@ def build_packet_captures_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12749,7 +14019,7 @@ def build_packet_captures_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12781,7 +14051,7 @@ def build_packet_captures_get_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12813,7 +14083,7 @@ def build_packet_captures_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12850,7 +14120,7 @@ def build_connection_monitors_create_or_update_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -12891,7 +14161,7 @@ def build_connection_monitors_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12927,7 +14197,7 @@ def build_connection_monitors_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -12963,7 +14233,7 @@ def build_connection_monitors_update_tags_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13002,7 +14272,7 @@ def build_connection_monitors_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13038,7 +14308,7 @@ def build_connection_monitors_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13074,7 +14344,7 @@ def build_connection_monitors_query_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13106,7 +14376,7 @@ def build_connection_monitors_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13137,7 +14407,7 @@ def build_flow_logs_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13172,7 +14442,7 @@ def build_flow_logs_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13207,7 +14477,7 @@ def build_flow_logs_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13239,7 +14509,7 @@ def build_flow_logs_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13271,7 +14541,7 @@ def build_flow_logs_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13300,7 +14570,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13321,7 +14591,7 @@ def build_private_endpoints_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13357,7 +14627,7 @@ def build_private_endpoints_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13390,7 +14660,7 @@ def build_private_endpoints_create_or_update_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13422,7 +14692,7 @@ def build_private_endpoints_list_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13452,7 +14722,7 @@ def build_private_endpoints_list_by_subscription_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13478,7 +14748,7 @@ def build_available_private_endpoint_types_list_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13508,7 +14778,7 @@ def build_available_private_endpoint_types_list_by_resource_group_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13543,7 +14813,7 @@ def build_private_dns_zone_groups_delete_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13579,7 +14849,7 @@ def build_private_dns_zone_groups_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13615,7 +14885,7 @@ def build_private_dns_zone_groups_create_or_update_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13650,7 +14920,7 @@ def build_private_dns_zone_groups_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13681,7 +14951,7 @@ def build_private_link_services_delete_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13712,7 +14982,7 @@ def build_private_link_services_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13745,7 +15015,7 @@ def build_private_link_services_create_or_update_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13779,7 +15049,7 @@ def build_private_link_services_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13809,7 +15079,7 @@ def build_private_link_services_list_by_subscription_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13841,7 +15111,7 @@ def build_private_link_services_get_private_endpoint_connection_request( # pyli _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13875,7 +15145,7 @@ def build_private_link_services_update_private_endpoint_connection_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -13910,7 +15180,7 @@ def build_private_link_services_delete_private_endpoint_connection_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13942,7 +15212,7 @@ def build_private_link_services_list_private_endpoint_connections_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -13973,7 +15243,7 @@ def build_private_link_services_check_private_link_service_visibility_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14006,7 +15276,7 @@ def build_private_link_services_check_private_link_service_visibility_by_resourc _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14040,7 +15310,7 @@ def build_private_link_services_list_auto_approved_private_link_services_request _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14070,7 +15340,7 @@ def build_private_link_services_list_auto_approved_private_link_services_by_reso _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14101,7 +15371,7 @@ def build_public_ip_prefixes_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14137,7 +15407,7 @@ def build_public_ip_prefixes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14170,7 +15440,7 @@ def build_public_ip_prefixes_create_or_update_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14204,7 +15474,7 @@ def build_public_ip_prefixes_update_tags_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14238,7 +15508,7 @@ def build_public_ip_prefixes_list_all_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14262,7 +15532,7 @@ def build_public_ip_prefixes_list_request(resource_group_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14292,7 +15562,7 @@ def build_route_filters_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14328,7 +15598,7 @@ def build_route_filters_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14361,7 +15631,7 @@ def build_route_filters_create_or_update_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14395,7 +15665,7 @@ def build_route_filters_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14429,7 +15699,7 @@ def build_route_filters_list_by_resource_group_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14457,7 +15727,7 @@ def build_route_filters_list_request(subscription_id: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14483,7 +15753,7 @@ def build_route_filter_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14515,7 +15785,7 @@ def build_route_filter_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14547,7 +15817,7 @@ def build_route_filter_rules_create_or_update_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14582,7 +15852,7 @@ def build_route_filter_rules_list_by_route_filter_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14613,7 +15883,7 @@ def build_route_tables_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14649,7 +15919,7 @@ def build_route_tables_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14682,7 +15952,7 @@ def build_route_tables_create_or_update_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14716,7 +15986,7 @@ def build_route_tables_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14748,7 +16018,7 @@ def build_route_tables_list_request(resource_group_name: str, subscription_id: s _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14776,7 +16046,7 @@ def build_route_tables_list_all_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14802,7 +16072,7 @@ def build_routes_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14834,7 +16104,7 @@ def build_routes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14866,7 +16136,7 @@ def build_routes_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -14901,7 +16171,7 @@ def build_routes_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14932,7 +16202,7 @@ def build_security_partner_providers_delete_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14965,7 +16235,7 @@ def build_security_partner_providers_get_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -14998,7 +16268,7 @@ def build_security_partner_providers_create_or_update_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15034,7 +16304,7 @@ def build_security_partner_providers_update_tags_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15070,7 +16340,7 @@ def build_security_partner_providers_list_by_resource_group_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15100,7 +16370,7 @@ def build_security_partner_providers_list_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15128,7 +16398,7 @@ def build_bgp_service_communities_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15156,7 +16426,7 @@ def build_service_endpoint_policies_delete_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15194,7 +16464,7 @@ def build_service_endpoint_policies_get_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15229,7 +16499,7 @@ def build_service_endpoint_policies_create_or_update_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15265,7 +16535,7 @@ def build_service_endpoint_policies_update_tags_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15301,7 +16571,7 @@ def build_service_endpoint_policies_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15329,7 +16599,7 @@ def build_service_endpoint_policies_list_by_resource_group_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15363,7 +16633,7 @@ def build_service_endpoint_policy_definitions_delete_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15403,7 +16673,7 @@ def build_service_endpoint_policy_definitions_get_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15443,7 +16713,7 @@ def build_service_endpoint_policy_definitions_create_or_update_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15482,7 +16752,7 @@ def build_service_endpoint_policy_definitions_list_by_resource_group_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15513,7 +16783,7 @@ def build_service_tags_list_request(location: str, subscription_id: str, **kwarg _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15547,7 +16817,7 @@ def build_service_tag_information_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15579,7 +16849,7 @@ def build_usages_list_request(location: str, subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15608,7 +16878,7 @@ def build_virtual_networks_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15644,7 +16914,7 @@ def build_virtual_networks_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15677,7 +16947,7 @@ def build_virtual_networks_create_or_update_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15711,7 +16981,7 @@ def build_virtual_networks_update_tags_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -15743,7 +17013,7 @@ def build_virtual_networks_list_all_request(subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15767,7 +17037,7 @@ def build_virtual_networks_list_request(resource_group_name: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15797,7 +17067,7 @@ def build_virtual_networks_check_ip_address_availability_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15829,7 +17099,7 @@ def build_virtual_networks_list_usage_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15866,7 +17136,7 @@ def build_virtual_networks_list_ddos_protection_status_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15901,7 +17171,7 @@ def build_subnets_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15939,7 +17209,7 @@ def build_subnets_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -15973,7 +17243,7 @@ def build_subnets_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16008,7 +17278,7 @@ def build_subnets_prepare_network_policies_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16043,7 +17313,7 @@ def build_subnets_unprepare_network_policies_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16078,7 +17348,7 @@ def build_subnets_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16109,7 +17379,7 @@ def build_resource_navigation_links_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16141,7 +17411,7 @@ def build_service_association_links_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16177,7 +17447,7 @@ def build_virtual_network_peerings_delete_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16215,7 +17485,7 @@ def build_virtual_network_peerings_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16255,7 +17525,7 @@ def build_virtual_network_peerings_create_or_update_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16296,7 +17566,7 @@ def build_virtual_network_peerings_list_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16327,7 +17597,7 @@ def build_virtual_network_gateways_create_or_update_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16363,7 +17633,7 @@ def build_virtual_network_gateways_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16396,7 +17666,7 @@ def build_virtual_network_gateways_delete_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16429,7 +17699,7 @@ def build_virtual_network_gateways_update_tags_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16465,7 +17735,7 @@ def build_virtual_network_gateways_list_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16495,7 +17765,7 @@ def build_virtual_network_gateways_list_connections_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16533,7 +17803,7 @@ def build_virtual_network_gateways_reset_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16568,7 +17838,7 @@ def build_virtual_network_gateways_reset_vpn_client_shared_key_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16601,7 +17871,7 @@ def build_virtual_network_gateways_generatevpnclientpackage_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16637,7 +17907,7 @@ def build_virtual_network_gateways_generate_vpn_profile_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16673,7 +17943,7 @@ def build_virtual_network_gateways_get_vpn_profile_package_url_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16711,7 +17981,7 @@ def build_virtual_network_gateways_get_bgp_peer_status_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16746,7 +18016,7 @@ def build_virtual_network_gateways_supported_vpn_devices_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16779,7 +18049,7 @@ def build_virtual_network_gateways_get_learned_routes_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16812,7 +18082,7 @@ def build_virtual_network_gateways_get_advertised_routes_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16846,7 +18116,7 @@ def build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16882,7 +18152,7 @@ def build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -16915,7 +18185,7 @@ def build_virtual_network_gateways_vpn_device_configuration_script_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16951,7 +18221,7 @@ def build_virtual_network_gateways_start_packet_capture_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -16987,7 +18257,7 @@ def build_virtual_network_gateways_stop_packet_capture_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17017,13 +18287,170 @@ def build_virtual_network_gateways_stop_packet_capture_request( # pylint: disab return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_virtual_network_gateways_get_failover_all_test_details_request( # pylint: disable=name-too-long + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + type: str, + fetch_latest: bool, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails", + ) # 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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["type"] = _SERIALIZER.query("type", type, "str") + _params["fetchLatest"] = _SERIALIZER.query("fetch_latest", fetch_latest, "bool") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_virtual_network_gateways_get_failover_single_test_details_request( # pylint: disable=name-too-long + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + peering_location: str, + failover_test_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails", + ) # 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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["peeringLocation"] = _SERIALIZER.query("peering_location", peering_location, "str") + _params["failoverTestId"] = _SERIALIZER.query("failover_test_id", failover_test_id, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_virtual_network_gateways_start_express_route_site_failover_simulation_request( # pylint: disable=name-too-long + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + peering_location: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest", + ) # 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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["peeringLocation"] = _SERIALIZER.query("peering_location", peering_location, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_virtual_network_gateways_stop_express_route_site_failover_simulation_request( # pylint: disable=name-too-long + resource_group_name: str, virtual_network_gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest", + ) # 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: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_virtual_network_gateways_get_vpnclient_connection_health_request( # pylint: disable=name-too-long resource_group_name: str, virtual_network_gateway_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17056,7 +18483,7 @@ def build_virtual_network_gateways_disconnect_virtual_network_gateway_vpn_connec _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17092,7 +18519,7 @@ def build_virtual_network_gateway_connections_create_or_update_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17128,7 +18555,7 @@ def build_virtual_network_gateway_connections_get_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17161,7 +18588,7 @@ def build_virtual_network_gateway_connections_delete_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17194,7 +18621,7 @@ def build_virtual_network_gateway_connections_update_tags_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17230,7 +18657,7 @@ def build_virtual_network_gateway_connections_set_shared_key_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17266,7 +18693,7 @@ def build_virtual_network_gateway_connections_get_shared_key_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17299,7 +18726,7 @@ def build_virtual_network_gateway_connections_list_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17329,7 +18756,7 @@ def build_virtual_network_gateway_connections_reset_shared_key_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17365,7 +18792,7 @@ def build_virtual_network_gateway_connections_start_packet_capture_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17401,7 +18828,7 @@ def build_virtual_network_gateway_connections_stop_packet_capture_request( # py _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17437,7 +18864,7 @@ def build_virtual_network_gateway_connections_get_ike_sas_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17470,7 +18897,7 @@ def build_virtual_network_gateway_connections_reset_connection_request( # pylin _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17503,7 +18930,7 @@ def build_local_network_gateways_create_or_update_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17539,7 +18966,7 @@ def build_local_network_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17572,7 +18999,7 @@ def build_local_network_gateways_delete_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17605,7 +19032,7 @@ def build_local_network_gateways_update_tags_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17641,7 +19068,7 @@ def build_local_network_gateways_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17671,7 +19098,7 @@ def build_virtual_network_gateway_nat_rules_get_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17705,7 +19132,7 @@ def build_virtual_network_gateway_nat_rules_create_or_update_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17742,7 +19169,7 @@ def build_virtual_network_gateway_nat_rules_delete_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17776,7 +19203,7 @@ def build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_requ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17809,7 +19236,7 @@ def build_virtual_network_taps_delete_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17840,7 +19267,7 @@ def build_virtual_network_taps_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17871,7 +19298,7 @@ def build_virtual_network_taps_create_or_update_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17905,7 +19332,7 @@ def build_virtual_network_taps_update_tags_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -17939,7 +19366,7 @@ def build_virtual_network_taps_list_all_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17965,7 +19392,7 @@ def build_virtual_network_taps_list_by_resource_group_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -17995,7 +19422,7 @@ def build_virtual_routers_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18031,7 +19458,7 @@ def build_virtual_routers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18064,7 +19491,7 @@ def build_virtual_routers_create_or_update_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18098,7 +19525,7 @@ def build_virtual_routers_list_by_resource_group_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18126,7 +19553,7 @@ def build_virtual_routers_list_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18152,7 +19579,7 @@ def build_virtual_router_peerings_delete_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18184,7 +19611,7 @@ def build_virtual_router_peerings_get_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18216,7 +19643,7 @@ def build_virtual_router_peerings_create_or_update_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18251,7 +19678,7 @@ def build_virtual_router_peerings_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18282,7 +19709,7 @@ def build_virtual_wans_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18313,7 +19740,7 @@ def build_virtual_wans_create_or_update_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18347,7 +19774,7 @@ def build_virtual_wans_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18381,7 +19808,7 @@ def build_virtual_wans_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18412,7 +19839,7 @@ def build_virtual_wans_list_by_resource_group_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18440,7 +19867,7 @@ def build_virtual_wans_list_request(subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18466,7 +19893,7 @@ def build_vpn_sites_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18497,7 +19924,7 @@ def build_vpn_sites_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18531,7 +19958,7 @@ def build_vpn_sites_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18565,7 +19992,7 @@ def build_vpn_sites_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18596,7 +20023,7 @@ def build_vpn_sites_list_by_resource_group_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18624,7 +20051,7 @@ def build_vpn_sites_list_request(subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18650,7 +20077,7 @@ def build_vpn_site_links_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18682,7 +20109,7 @@ def build_vpn_site_links_list_by_vpn_site_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18713,7 +20140,7 @@ def build_vpn_sites_configuration_download_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18747,7 +20174,7 @@ def build_vpn_server_configurations_get_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18780,7 +20207,7 @@ def build_vpn_server_configurations_create_or_update_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18816,7 +20243,7 @@ def build_vpn_server_configurations_update_tags_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18852,7 +20279,7 @@ def build_vpn_server_configurations_delete_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18885,7 +20312,7 @@ def build_vpn_server_configurations_list_by_resource_group_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18915,7 +20342,7 @@ def build_vpn_server_configurations_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -18947,7 +20374,7 @@ def build_configuration_policy_groups_create_or_update_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -18990,7 +20417,7 @@ def build_configuration_policy_groups_delete_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19030,7 +20457,7 @@ def build_configuration_policy_groups_get_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19066,7 +20493,7 @@ def build_configuration_policy_groups_list_by_vpn_server_configuration_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19099,7 +20526,7 @@ def build_virtual_hubs_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19130,7 +20557,7 @@ def build_virtual_hubs_create_or_update_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19164,7 +20591,7 @@ def build_virtual_hubs_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19198,7 +20625,7 @@ def build_virtual_hubs_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19229,7 +20656,7 @@ def build_virtual_hubs_list_by_resource_group_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19257,7 +20684,7 @@ def build_virtual_hubs_list_request(subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19283,7 +20710,7 @@ def build_virtual_hubs_get_effective_virtual_hub_routes_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19317,7 +20744,7 @@ def build_virtual_hubs_get_inbound_routes_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19351,7 +20778,7 @@ def build_virtual_hubs_get_outbound_routes_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19385,7 +20812,7 @@ def build_route_maps_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19417,7 +20844,7 @@ def build_route_maps_create_or_update_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19452,7 +20879,7 @@ def build_route_maps_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19484,7 +20911,7 @@ def build_route_maps_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19515,7 +20942,7 @@ def build_hub_virtual_network_connections_create_or_update_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19550,7 +20977,7 @@ def build_hub_virtual_network_connections_delete_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19582,7 +21009,7 @@ def build_hub_virtual_network_connections_get_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19614,7 +21041,7 @@ def build_hub_virtual_network_connections_list_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19645,7 +21072,7 @@ def build_vpn_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19676,7 +21103,7 @@ def build_vpn_gateways_create_or_update_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19710,7 +21137,7 @@ def build_vpn_gateways_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19744,7 +21171,7 @@ def build_vpn_gateways_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19780,7 +21207,7 @@ def build_vpn_gateways_reset_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19813,7 +21240,7 @@ def build_vpn_gateways_start_packet_capture_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19847,7 +21274,7 @@ def build_vpn_gateways_stop_packet_capture_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -19881,7 +21308,7 @@ def build_vpn_gateways_list_by_resource_group_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19909,7 +21336,7 @@ def build_vpn_gateways_list_request(subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19940,7 +21367,7 @@ def build_vpn_link_connections_reset_connection_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -19978,7 +21405,7 @@ def build_vpn_link_connections_get_all_shared_keys_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20016,7 +21443,7 @@ def build_vpn_link_connections_get_default_shared_key_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20054,7 +21481,7 @@ def build_vpn_link_connections_set_or_init_default_shared_key_request( # pylint _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20095,7 +21522,7 @@ def build_vpn_link_connections_list_default_shared_key_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20133,7 +21560,7 @@ def build_vpn_link_connections_get_ike_sas_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20166,7 +21593,7 @@ def build_vpn_link_connections_list_by_vpn_connection_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20198,7 +21625,7 @@ def build_vpn_connections_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20230,7 +21657,7 @@ def build_vpn_connections_create_or_update_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20265,7 +21692,7 @@ def build_vpn_connections_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20297,7 +21724,7 @@ def build_vpn_connections_start_packet_capture_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20332,7 +21759,7 @@ def build_vpn_connections_stop_packet_capture_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20367,7 +21794,7 @@ def build_vpn_connections_list_by_vpn_gateway_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20403,7 +21830,7 @@ def build_vpn_site_link_connections_get_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20436,7 +21863,7 @@ def build_nat_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20468,7 +21895,7 @@ def build_nat_rules_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20503,7 +21930,7 @@ def build_nat_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20535,7 +21962,7 @@ def build_nat_rules_list_by_vpn_gateway_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20566,7 +21993,7 @@ def build_p2_svpn_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20597,7 +22024,7 @@ def build_p2_svpn_gateways_create_or_update_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20631,7 +22058,7 @@ def build_p2_svpn_gateways_update_tags_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20665,7 +22092,7 @@ def build_p2_svpn_gateways_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20696,7 +22123,7 @@ def build_p2_svpn_gateways_list_by_resource_group_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20724,7 +22151,7 @@ def build_p2_svpn_gateways_list_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20750,7 +22177,7 @@ def build_p2_svpn_gateways_reset_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20781,7 +22208,7 @@ def build_p2_svpn_gateways_generate_vpn_profile_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20815,7 +22242,7 @@ def build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20846,7 +22273,7 @@ def build_p2_svpn_gateways_get_p2_s_vpn_connection_health_detailed_request( # p _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20880,7 +22307,7 @@ def build_p2_svpn_gateways_disconnect_p2_s_vpn_connections_request( # pylint: d _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -20914,7 +22341,7 @@ def build_vpn_server_configurations_associated_with_virtual_wan_list_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20945,7 +22372,7 @@ def build_virtual_hub_route_table_v2_s_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -20977,7 +22404,7 @@ def build_virtual_hub_route_table_v2_s_create_or_update_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21012,7 +22439,7 @@ def build_virtual_hub_route_table_v2_s_delete_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21044,7 +22471,7 @@ def build_virtual_hub_route_table_v2_s_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21075,7 +22502,7 @@ def build_express_route_gateways_list_by_subscription_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21103,7 +22530,7 @@ def build_express_route_gateways_list_by_resource_group_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21133,7 +22560,7 @@ def build_express_route_gateways_create_or_update_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21167,7 +22594,7 @@ def build_express_route_gateways_update_tags_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21201,7 +22628,7 @@ def build_express_route_gateways_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21232,7 +22659,7 @@ def build_express_route_gateways_delete_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21263,7 +22690,7 @@ def build_express_route_connections_create_or_update_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21298,7 +22725,7 @@ def build_express_route_connections_get_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21330,7 +22757,7 @@ def build_express_route_connections_delete_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21362,7 +22789,7 @@ def build_express_route_connections_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21397,7 +22824,7 @@ def build_network_virtual_appliance_connections_create_or_update_request( # pyl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21438,7 +22865,7 @@ def build_network_virtual_appliance_connections_get_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21476,7 +22903,7 @@ def build_network_virtual_appliance_connections_delete_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21510,7 +22937,7 @@ def build_network_virtual_appliance_connections_list_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21543,7 +22970,7 @@ def build_virtual_hub_bgp_connection_get_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21575,7 +23002,7 @@ def build_virtual_hub_bgp_connection_create_or_update_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21610,7 +23037,7 @@ def build_virtual_hub_bgp_connection_delete_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21642,7 +23069,7 @@ def build_virtual_hub_bgp_connections_list_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21673,7 +23100,7 @@ def build_virtual_hub_bgp_connections_list_learned_routes_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21705,7 +23132,7 @@ def build_virtual_hub_bgp_connections_list_advertised_routes_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21737,7 +23164,7 @@ def build_virtual_hub_ip_configuration_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21769,7 +23196,7 @@ def build_virtual_hub_ip_configuration_create_or_update_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21804,7 +23231,7 @@ def build_virtual_hub_ip_configuration_delete_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21836,7 +23263,7 @@ def build_virtual_hub_ip_configuration_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21867,7 +23294,7 @@ def build_hub_route_tables_create_or_update_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -21902,7 +23329,7 @@ def build_hub_route_tables_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21934,7 +23361,7 @@ def build_hub_route_tables_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21966,7 +23393,7 @@ def build_hub_route_tables_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -21997,7 +23424,7 @@ def build_routing_intent_create_or_update_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -22032,7 +23459,7 @@ def build_routing_intent_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22064,7 +23491,7 @@ def build_routing_intent_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22096,7 +23523,7 @@ def build_routing_intent_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22127,7 +23554,7 @@ def build_web_application_firewall_policies_list_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22157,7 +23584,7 @@ def build_web_application_firewall_policies_list_all_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22186,7 +23613,7 @@ def build_web_application_firewall_policies_get_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22217,7 +23644,7 @@ def build_web_application_firewall_policies_create_or_update_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -22251,7 +23678,7 @@ def build_web_application_firewall_policies_delete_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -22298,7 +23725,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, application_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22309,7 +23736,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_delete_request( @@ -22360,7 +23787,7 @@ def begin_delete(self, resource_group_name: str, application_gateway_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -22411,7 +23838,7 @@ def get(self, resource_group_name: str, application_gateway_name: str, **kwargs: :rtype: ~azure.mgmt.network.models.ApplicationGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22422,7 +23849,7 @@ def get(self, resource_group_name: str, application_gateway_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) _request = build_application_gateways_get_request( @@ -22460,7 +23887,7 @@ def _create_or_update_initial( parameters: Union[_models.ApplicationGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22471,7 +23898,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -22600,7 +24027,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -22719,7 +24146,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ApplicationGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22730,7 +24157,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGateway] = kwargs.pop("cls", None) @@ -22786,10 +24213,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.App _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22850,10 +24277,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.ApplicationGateway"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22903,7 +24330,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _start_initial(self, resource_group_name: str, application_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22914,7 +24341,7 @@ def _start_initial(self, resource_group_name: str, application_gateway_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_start_request( @@ -22965,7 +24392,7 @@ def begin_start(self, resource_group_name: str, application_gateway_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -23005,7 +24432,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _stop_initial(self, resource_group_name: str, application_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23016,7 +24443,7 @@ def _stop_initial(self, resource_group_name: str, application_gateway_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_stop_request( @@ -23067,7 +24494,7 @@ def begin_stop(self, resource_group_name: str, application_gateway_name: str, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -23109,7 +24536,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _backend_health_initial( self, resource_group_name: str, application_gateway_name: str, *, expand: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23120,7 +24547,7 @@ def _backend_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateways_backend_health_request( @@ -23179,7 +24606,7 @@ def begin_backend_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayBackendHealth] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -23232,7 +24659,7 @@ def _backend_health_on_demand_initial( expand: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23243,7 +24670,7 @@ def _backend_health_on_demand_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -23390,7 +24817,7 @@ def begin_backend_health_on_demand( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGatewayBackendHealthOnDemand] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -23445,7 +24872,7 @@ def list_available_server_variables(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23456,7 +24883,7 @@ def list_available_server_variables(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_server_variables_request( @@ -23494,7 +24921,7 @@ def list_available_request_headers(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23505,7 +24932,7 @@ def list_available_request_headers(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_request_headers_request( @@ -23543,7 +24970,7 @@ def list_available_response_headers(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23554,7 +24981,7 @@ def list_available_response_headers(self, **kwargs: Any) -> List[str]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[List[str]] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_response_headers_request( @@ -23592,7 +25019,7 @@ def list_available_waf_rule_sets(self, **kwargs: Any) -> _models.ApplicationGate :rtype: ~azure.mgmt.network.models.ApplicationGatewayAvailableWafRuleSetsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23603,7 +25030,7 @@ def list_available_waf_rule_sets(self, **kwargs: Any) -> _models.ApplicationGate _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableWafRuleSetsResult] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_waf_rule_sets_request( @@ -23642,7 +25069,7 @@ def list_available_ssl_options(self, **kwargs: Any) -> _models.ApplicationGatewa :rtype: ~azure.mgmt.network.models.ApplicationGatewayAvailableSslOptions :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23653,7 +25080,7 @@ def list_available_ssl_options(self, **kwargs: Any) -> _models.ApplicationGatewa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableSslOptions] = kwargs.pop("cls", None) _request = build_application_gateways_list_available_ssl_options_request( @@ -23697,10 +25124,10 @@ def list_available_ssl_predefined_policies( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayAvailableSslPredefinedPolicies] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23761,7 +25188,7 @@ def get_ssl_predefined_policy( :rtype: ~azure.mgmt.network.models.ApplicationGatewaySslPredefinedPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23772,7 +25199,7 @@ def get_ssl_predefined_policy( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewaySslPredefinedPolicy] = kwargs.pop("cls", None) _request = build_application_gateways_get_ssl_predefined_policy_request( @@ -23841,10 +25268,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateLinkResourceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23918,7 +25345,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, application_gateway_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23929,7 +25356,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_gateway_private_endpoint_connections_delete_request( @@ -23986,7 +25413,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -24034,7 +25461,7 @@ def _update_initial( parameters: Union[_models.ApplicationGatewayPrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24045,7 +25472,7 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -24192,7 +25619,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -24258,7 +25685,7 @@ def get( :rtype: ~azure.mgmt.network.models.ApplicationGatewayPrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24269,7 +25696,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnection] = kwargs.pop("cls", None) _request = build_application_gateway_private_endpoint_connections_get_request( @@ -24320,10 +25747,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayPrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24404,7 +25831,7 @@ def get(self, location: str, **kwargs: Any) -> _models.ApplicationGatewayWafDyna :rtype: ~azure.mgmt.network.models.ApplicationGatewayWafDynamicManifestResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24415,7 +25842,7 @@ def get(self, location: str, **kwargs: Any) -> _models.ApplicationGatewayWafDyna _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayWafDynamicManifestResult] = kwargs.pop("cls", None) _request = build_application_gateway_waf_dynamic_manifests_default_get_request( @@ -24480,10 +25907,10 @@ def get(self, location: str, **kwargs: Any) -> Iterable["_models.ApplicationGate _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationGatewayWafDynamicManifestResultList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24556,7 +25983,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, application_security_group_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24567,7 +25994,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_application_security_groups_delete_request( @@ -24620,7 +26047,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -24673,7 +26100,7 @@ def get( :rtype: ~azure.mgmt.network.models.ApplicationSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24684,7 +26111,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) _request = build_application_security_groups_get_request( @@ -24722,7 +26149,7 @@ def _create_or_update_initial( parameters: Union[_models.ApplicationSecurityGroup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24733,7 +26160,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -24862,7 +26289,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -24981,7 +26408,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ApplicationSecurityGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24992,7 +26419,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationSecurityGroup] = kwargs.pop("cls", None) @@ -25047,10 +26474,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.ApplicationSecurityGroup" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25113,10 +26540,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.App _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ApplicationSecurityGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25199,10 +26626,10 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.AvailableDeleg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableDelegationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25287,10 +26714,10 @@ def list(self, location: str, resource_group_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableDelegationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25375,10 +26802,10 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.AvailableServi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableServiceAliasesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25446,10 +26873,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailableServiceAliasesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25521,7 +26948,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25532,7 +26959,7 @@ def _delete_initial(self, resource_group_name: str, azure_firewall_name: str, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_azure_firewalls_delete_request( @@ -25583,7 +27010,7 @@ def begin_delete(self, resource_group_name: str, azure_firewall_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -25634,7 +27061,7 @@ def get(self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.AzureFirewall :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25645,7 +27072,7 @@ def get(self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) _request = build_azure_firewalls_get_request( @@ -25683,7 +27110,7 @@ def _create_or_update_initial( parameters: Union[_models.AzureFirewall, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25694,7 +27121,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -25823,7 +27250,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -25876,7 +27303,7 @@ def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25887,7 +27314,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -26014,7 +27441,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureFirewall] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -26073,10 +27500,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Azu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26137,10 +27564,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.AzureFirewall"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26192,7 +27619,7 @@ def get_next(next_link=None): def _list_learned_prefixes_initial( self, resource_group_name: str, azure_firewall_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26203,7 +27630,7 @@ def _list_learned_prefixes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_azure_firewalls_list_learned_prefixes_request( @@ -26257,7 +27684,7 @@ def begin_list_learned_prefixes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.IPPrefixesList] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -26307,7 +27734,7 @@ def _packet_capture_initial( parameters: Union[_models.FirewallPacketCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26318,7 +27745,7 @@ def _packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -26445,7 +27872,7 @@ def begin_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -26519,10 +27946,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.AzureFirewallFqdnTag"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureFirewallFqdnTagListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26604,7 +28031,7 @@ def get(self, name: str, *, expand: Optional[str] = None, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.network.models.AzureWebCategory :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26615,7 +28042,7 @@ def get(self, name: str, *, expand: Optional[str] = None, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureWebCategory] = kwargs.pop("cls", None) _request = build_web_categories_get_request( @@ -26657,10 +28084,10 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AzureWebCateg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AzureWebCategoryListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26730,7 +28157,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, bastion_host_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26741,7 +28168,7 @@ def _delete_initial(self, resource_group_name: str, bastion_host_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_bastion_hosts_delete_request( @@ -26792,7 +28219,7 @@ def begin_delete(self, resource_group_name: str, bastion_host_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -26843,7 +28270,7 @@ def get(self, resource_group_name: str, bastion_host_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.network.models.BastionHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26854,7 +28281,7 @@ def get(self, resource_group_name: str, bastion_host_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) _request = build_bastion_hosts_get_request( @@ -26892,7 +28319,7 @@ def _create_or_update_initial( parameters: Union[_models.BastionHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26903,7 +28330,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -27032,7 +28459,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -27085,7 +28512,7 @@ def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27096,7 +28523,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -27223,7 +28650,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionHost] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -27280,10 +28707,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.BastionHost"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27345,10 +28772,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27408,7 +28835,7 @@ def _put_bastion_shareable_link_initial( bsl_request: Union[_models.BastionShareableLinkListRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27419,7 +28846,7 @@ def _put_bastion_shareable_link_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -27552,11 +28979,11 @@ def begin_put_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionShareableLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27667,7 +29094,7 @@ def _delete_bastion_shareable_link_initial( bsl_request: Union[_models.BastionShareableLinkListRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27678,7 +29105,7 @@ def _delete_bastion_shareable_link_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -27804,7 +29231,7 @@ def begin_delete_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -27853,7 +29280,7 @@ def _delete_bastion_shareable_link_by_token_initial( # pylint: disable=name-too bsl_token_request: Union[_models.BastionShareableLinkTokenListRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27864,7 +29291,7 @@ def _delete_bastion_shareable_link_by_token_initial( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -27994,7 +29421,7 @@ def begin_delete_bastion_shareable_link_by_token( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -28117,11 +29544,11 @@ def get_bastion_shareable_link( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionShareableLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28185,7 +29612,7 @@ def get_next(next_link=None): def _get_active_sessions_initial( self, resource_group_name: str, bastion_host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28196,7 +29623,7 @@ def _get_active_sessions_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_management_get_active_sessions_request( @@ -28252,10 +29679,10 @@ def begin_get_active_sessions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BastionActiveSessionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28423,11 +29850,11 @@ def disconnect_active_sessions( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BastionSessionDeleteResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28503,7 +29930,7 @@ def check_dns_name_availability( :rtype: ~azure.mgmt.network.models.DnsNameAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28514,7 +29941,7 @@ def check_dns_name_availability( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DnsNameAvailabilityResult] = kwargs.pop("cls", None) _request = build_network_management_check_dns_name_availability_request( @@ -28555,7 +29982,7 @@ def express_route_provider_port(self, providerport: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.network.models.ExpressRouteProviderPort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28566,7 +29993,7 @@ def express_route_provider_port(self, providerport: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteProviderPort] = kwargs.pop("cls", None) _request = build_network_management_express_route_provider_port_request( @@ -28682,7 +30109,7 @@ def list_active_connectivity_configurations( :rtype: ~azure.mgmt.network.models.ActiveConnectivityConfigurationsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28693,7 +30120,7 @@ def list_active_connectivity_configurations( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActiveConnectivityConfigurationsListResult] = kwargs.pop("cls", None) @@ -28823,7 +30250,7 @@ def list_active_security_admin_rules( :rtype: ~azure.mgmt.network.models.ActiveSecurityAdminRulesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28834,7 +30261,7 @@ def list_active_security_admin_rules( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActiveSecurityAdminRulesListResult] = kwargs.pop("cls", None) @@ -28967,7 +30394,7 @@ def list_network_manager_effective_connectivity_configurations( # pylint: disab :rtype: ~azure.mgmt.network.models.NetworkManagerEffectiveConnectivityConfigurationListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28978,7 +30405,7 @@ def list_network_manager_effective_connectivity_configurations( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerEffectiveConnectivityConfigurationListResult] = kwargs.pop("cls", None) @@ -29110,7 +30537,7 @@ def list_network_manager_effective_security_admin_rules( # pylint: disable=name :rtype: ~azure.mgmt.network.models.NetworkManagerEffectiveSecurityAdminRulesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29121,7 +30548,7 @@ def list_network_manager_effective_security_admin_rules( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkManagerEffectiveSecurityAdminRulesListResult] = kwargs.pop("cls", None) @@ -29182,7 +30609,7 @@ def supported_security_providers( :rtype: ~azure.mgmt.network.models.VirtualWanSecurityProviders :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29193,7 +30620,7 @@ def supported_security_providers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualWanSecurityProviders] = kwargs.pop("cls", None) _request = build_network_management_supported_security_providers_request( @@ -29231,7 +30658,7 @@ def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( # pylint: disa vpn_client_params: Union[_models.VirtualWanVpnProfileParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29242,7 +30669,7 @@ def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -29377,7 +30804,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnProfileResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -29462,10 +30889,10 @@ def list_cloud_service_role_instance_network_interfaces( # pylint: disable=name _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29534,10 +30961,10 @@ def list_cloud_service_network_interfaces( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29615,7 +31042,7 @@ def get_cloud_service_network_interface( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29626,7 +31053,7 @@ def get_cloud_service_network_interface( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) _request = build_network_interfaces_get_cloud_service_network_interface_request( @@ -29661,7 +31088,7 @@ def get_cloud_service_network_interface( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, network_interface_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29672,7 +31099,7 @@ def _delete_initial(self, resource_group_name: str, network_interface_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_delete_request( @@ -29723,7 +31150,7 @@ def begin_delete(self, resource_group_name: str, network_interface_name: str, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -29778,7 +31205,7 @@ def get( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29789,7 +31216,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) _request = build_network_interfaces_get_request( @@ -29828,7 +31255,7 @@ def _create_or_update_initial( parameters: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29839,7 +31266,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -29968,7 +31395,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -30087,7 +31514,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30098,7 +31525,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) @@ -30152,10 +31579,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkInterface"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30217,10 +31644,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Net _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30273,7 +31700,7 @@ def get_next(next_link=None): def _get_effective_route_table_initial( self, resource_group_name: str, network_interface_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30284,7 +31711,7 @@ def _get_effective_route_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_get_effective_route_table_request( @@ -30338,7 +31765,7 @@ def begin_get_effective_route_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EffectiveRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -30384,7 +31811,7 @@ def get_long_running_output(pipeline_response): def _list_effective_network_security_groups_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_interface_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30395,7 +31822,7 @@ def _list_effective_network_security_groups_initial( # pylint: disable=name-too _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_interfaces_list_effective_network_security_groups_request( @@ -30450,7 +31877,7 @@ def begin_list_effective_network_security_groups( # pylint: disable=name-too-lo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EffectiveNetworkSecurityGroupListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -30516,7 +31943,7 @@ def list_virtual_machine_scale_set_vm_network_interfaces( # pylint: disable=nam api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30588,7 +32015,7 @@ def list_virtual_machine_scale_set_network_interfaces( # pylint: disable=name-t api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30666,7 +32093,7 @@ def get_virtual_machine_scale_set_network_interface( # pylint: disable=name-too :rtype: ~azure.mgmt.network.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30746,7 +32173,7 @@ def list_virtual_machine_scale_set_ip_configurations( # pylint: disable=name-to api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30830,7 +32257,7 @@ def get_virtual_machine_scale_set_ip_configuration( # pylint: disable=name-too- :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30913,10 +32340,10 @@ def list_cloud_service_public_ip_addresses( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30997,10 +32424,10 @@ def list_cloud_service_role_instance_public_ip_addresses( # pylint: disable=nam _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31087,7 +32514,7 @@ def get_cloud_service_public_ip_address( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31098,7 +32525,7 @@ def get_cloud_service_public_ip_address( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) _request = build_public_ip_addresses_get_cloud_service_public_ip_address_request( @@ -31135,7 +32562,7 @@ def get_cloud_service_public_ip_address( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, public_ip_address_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31146,7 +32573,7 @@ def _delete_initial(self, resource_group_name: str, public_ip_address_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_addresses_delete_request( @@ -31201,7 +32628,7 @@ def begin_delete(self, resource_group_name: str, public_ip_address_name: str, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -31256,7 +32683,7 @@ def get( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31267,7 +32694,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) _request = build_public_ip_addresses_get_request( @@ -31306,7 +32733,7 @@ def _create_or_update_initial( parameters: Union[_models.PublicIPAddress, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31317,7 +32744,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -31446,7 +32873,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -31565,7 +32992,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31576,7 +33003,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPAddress] = kwargs.pop("cls", None) @@ -31630,10 +33057,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.PublicIPAddress"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31695,10 +33122,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Pub _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31751,7 +33178,7 @@ def get_next(next_link=None): def _ddos_protection_status_initial( self, resource_group_name: str, public_ip_address_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31762,7 +33189,7 @@ def _ddos_protection_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_addresses_ddos_protection_status_request( @@ -31821,7 +33248,7 @@ def begin_ddos_protection_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIpDdosProtectionStatusResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -31884,7 +33311,7 @@ def list_virtual_machine_scale_set_public_ip_addresses( # pylint: disable=name- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31968,7 +33395,7 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( # pylint: disable=na api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-10-01")) cls: ClsType[_models.PublicIPAddressListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32055,7 +33482,7 @@ def get_virtual_machine_scale_set_public_ip_address( # pylint: disable=name-too :rtype: ~azure.mgmt.network.models.PublicIPAddress :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32135,7 +33562,7 @@ def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _models.Swa :rtype: ~azure.mgmt.network.models.SwapResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32147,7 +33574,7 @@ def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _models.Swa _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SwapResource] = kwargs.pop("cls", None) _request = build_vip_swap_get_request( @@ -32182,7 +33609,7 @@ def get(self, group_name: str, resource_name: str, **kwargs: Any) -> _models.Swa def _create_initial( self, group_name: str, resource_name: str, parameters: Union[_models.SwapResource, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32194,7 +33621,7 @@ def _create_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -32318,7 +33745,7 @@ def begin_create( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) singleton_resource: Literal["swap"] = kwargs.pop("singleton_resource", "swap") - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -32372,7 +33799,7 @@ def list(self, group_name: str, resource_name: str, **kwargs: Any) -> _models.Sw :rtype: ~azure.mgmt.network.models.SwapResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32383,7 +33810,7 @@ def list(self, group_name: str, resource_name: str, **kwargs: Any) -> _models.Sw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SwapResourceListResult] = kwargs.pop("cls", None) _request = build_vip_swap_list_request( @@ -32435,7 +33862,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, custom_ip_prefix_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32446,7 +33873,7 @@ def _delete_initial(self, resource_group_name: str, custom_ip_prefix_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_custom_ip_prefixes_delete_request( @@ -32497,7 +33924,7 @@ def begin_delete(self, resource_group_name: str, custom_ip_prefix_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -32552,7 +33979,7 @@ def get( :rtype: ~azure.mgmt.network.models.CustomIpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32563,7 +33990,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) _request = build_custom_ip_prefixes_get_request( @@ -32602,7 +34029,7 @@ def _create_or_update_initial( parameters: Union[_models.CustomIpPrefix, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32613,7 +34040,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -32742,7 +34169,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -32861,7 +34288,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.CustomIpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32872,7 +34299,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomIpPrefix] = kwargs.pop("cls", None) @@ -32926,10 +34353,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CustomIpPrefix"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -32991,10 +34418,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Cus _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.CustomIpPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33065,7 +34492,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, ddos_custom_policy_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33076,7 +34503,7 @@ def _delete_initial(self, resource_group_name: str, ddos_custom_policy_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_ddos_custom_policies_delete_request( @@ -33131,7 +34558,7 @@ def begin_delete(self, resource_group_name: str, ddos_custom_policy_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -33182,7 +34609,7 @@ def get(self, resource_group_name: str, ddos_custom_policy_name: str, **kwargs: :rtype: ~azure.mgmt.network.models.DdosCustomPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33193,7 +34620,7 @@ def get(self, resource_group_name: str, ddos_custom_policy_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) _request = build_ddos_custom_policies_get_request( @@ -33231,7 +34658,7 @@ def _create_or_update_initial( parameters: Union[_models.DdosCustomPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33242,7 +34669,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -33369,7 +34796,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -33488,7 +34915,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.DdosCustomPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33499,7 +34926,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosCustomPolicy] = kwargs.pop("cls", None) @@ -33565,7 +34992,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, ddos_protection_plan_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33576,7 +35003,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_ddos_protection_plans_delete_request( @@ -33631,7 +35058,7 @@ def begin_delete(self, resource_group_name: str, ddos_protection_plan_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -33684,7 +35111,7 @@ def get( :rtype: ~azure.mgmt.network.models.DdosProtectionPlan :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33695,7 +35122,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) _request = build_ddos_protection_plans_get_request( @@ -33733,7 +35160,7 @@ def _create_or_update_initial( parameters: Union[_models.DdosProtectionPlan, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -33744,7 +35171,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -33871,7 +35298,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -33992,7 +35419,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.DdosProtectionPlan :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34003,7 +35430,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DdosProtectionPlan] = kwargs.pop("cls", None) @@ -34057,10 +35484,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.DdosProtectionPlan"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlanListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34122,10 +35549,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DdosProtectionPlanListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34202,7 +35629,7 @@ def _create_or_update_initial( parameters: Union[_models.DscpConfiguration, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34213,7 +35640,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -34342,7 +35769,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscpConfiguration] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -34389,7 +35816,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, dscp_configuration_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34400,7 +35827,7 @@ def _delete_initial(self, resource_group_name: str, dscp_configuration_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_dscp_configuration_delete_request( @@ -34451,7 +35878,7 @@ def begin_delete(self, resource_group_name: str, dscp_configuration_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -34502,7 +35929,7 @@ def get(self, resource_group_name: str, dscp_configuration_name: str, **kwargs: :rtype: ~azure.mgmt.network.models.DscpConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34513,7 +35940,7 @@ def get(self, resource_group_name: str, dscp_configuration_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfiguration] = kwargs.pop("cls", None) _request = build_dscp_configuration_get_request( @@ -34557,10 +35984,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Dsc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34621,10 +36048,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.DscpConfiguration"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.DscpConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34707,10 +36134,10 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.EndpointServic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.EndpointServicesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34783,7 +36210,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, circuit_name: str, authorization_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34794,7 +36221,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_authorizations_delete_request( @@ -34850,7 +36277,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -34906,7 +36333,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitAuthorization :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34917,7 +36344,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitAuthorization] = kwargs.pop("cls", None) _request = build_express_route_circuit_authorizations_get_request( @@ -34957,7 +36384,7 @@ def _create_or_update_initial( authorization_parameters: Union[_models.ExpressRouteCircuitAuthorization, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -34968,7 +36395,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -35112,7 +36539,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitAuthorization] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -35178,10 +36605,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AuthorizationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35255,7 +36682,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35266,7 +36693,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_peerings_delete_request( @@ -35322,7 +36749,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -35378,7 +36805,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35389,7 +36816,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitPeering] = kwargs.pop("cls", None) _request = build_express_route_circuit_peerings_get_request( @@ -35429,7 +36856,7 @@ def _create_or_update_initial( peering_parameters: Union[_models.ExpressRouteCircuitPeering, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35440,7 +36867,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -35579,7 +37006,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitPeering] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -35644,10 +37071,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35721,7 +37148,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35732,7 +37159,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuit_connections_delete_request( @@ -35792,7 +37219,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -35851,7 +37278,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35862,7 +37289,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitConnection] = kwargs.pop("cls", None) _request = build_express_route_circuit_connections_get_request( @@ -35904,7 +37331,7 @@ def _create_or_update_initial( express_route_circuit_connection_parameters: Union[_models.ExpressRouteCircuitConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -35915,7 +37342,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -36067,7 +37494,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuitConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -36136,10 +37563,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36230,7 +37657,7 @@ def get( :rtype: ~azure.mgmt.network.models.PeerExpressRouteCircuitConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36241,7 +37668,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PeerExpressRouteCircuitConnection] = kwargs.pop("cls", None) _request = build_peer_express_route_circuit_connections_get_request( @@ -36296,10 +37723,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PeerExpressRouteCircuitConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36372,7 +37799,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, circuit_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36383,7 +37810,7 @@ def _delete_initial(self, resource_group_name: str, circuit_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_delete_request( @@ -36434,7 +37861,7 @@ def begin_delete(self, resource_group_name: str, circuit_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -36485,7 +37912,7 @@ def get(self, resource_group_name: str, circuit_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.network.models.ExpressRouteCircuit :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36496,7 +37923,7 @@ def get(self, resource_group_name: str, circuit_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_request( @@ -36534,7 +37961,7 @@ def _create_or_update_initial( parameters: Union[_models.ExpressRouteCircuit, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36545,7 +37972,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -36674,7 +38101,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -36793,7 +38220,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuit :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36804,7 +38231,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCircuit] = kwargs.pop("cls", None) @@ -36850,7 +38277,7 @@ def update_tags( def _list_arp_table_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36861,7 +38288,7 @@ def _list_arp_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_arp_table_request( @@ -36923,7 +38350,7 @@ def begin_list_arp_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsArpTableListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -36971,7 +38398,7 @@ def get_long_running_output(pipeline_response): def _list_routes_table_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -36982,7 +38409,7 @@ def _list_routes_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_routes_table_request( @@ -37044,7 +38471,7 @@ def begin_list_routes_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -37094,7 +38521,7 @@ def get_long_running_output(pipeline_response): def _list_routes_table_summary_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37105,7 +38532,7 @@ def _list_routes_table_summary_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_circuits_list_routes_table_summary_request( @@ -37167,7 +38594,7 @@ def begin_list_routes_table_summary( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableSummaryListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -37226,7 +38653,7 @@ def get_stats(self, resource_group_name: str, circuit_name: str, **kwargs: Any) :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitStats :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37237,7 +38664,7 @@ def get_stats(self, resource_group_name: str, circuit_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitStats] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_stats_request( @@ -37284,7 +38711,7 @@ def get_peering_stats( :rtype: ~azure.mgmt.network.models.ExpressRouteCircuitStats :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37295,7 +38722,7 @@ def get_peering_stats( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitStats] = kwargs.pop("cls", None) _request = build_express_route_circuits_get_peering_stats_request( @@ -37340,10 +38767,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Exp _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37404,10 +38831,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.ExpressRouteCircuit"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37488,10 +38915,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.ExpressRouteServiceProvider"] _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteServiceProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37575,10 +39002,10 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37644,10 +39071,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37713,7 +39140,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37724,7 +39151,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_get_request( @@ -37762,7 +39189,7 @@ def _create_or_update_initial( parameters: Union[_models.ExpressRouteCrossConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -37773,7 +39200,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -37902,7 +39329,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -38023,7 +39450,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38034,7 +39461,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnection] = kwargs.pop("cls", None) @@ -38080,7 +39507,7 @@ def update_tags( def _list_arp_table_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38091,7 +39518,7 @@ def _list_arp_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_arp_table_request( @@ -38153,7 +39580,7 @@ def begin_list_arp_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsArpTableListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -38201,7 +39628,7 @@ def get_long_running_output(pipeline_response): def _list_routes_table_summary_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38212,7 +39639,7 @@ def _list_routes_table_summary_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_routes_table_summary_request( @@ -38254,6 +39681,7 @@ def _list_routes_table_summary_initial( 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]: + # pylint: disable=line-too-long """Gets the route table summary associated with the express route cross connection in a resource group. @@ -38274,7 +39702,7 @@ def begin_list_routes_table_summary( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -38324,7 +39752,7 @@ def get_long_running_output(pipeline_response): def _list_routes_table_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38335,7 +39763,7 @@ def _list_routes_table_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connections_list_routes_table_request( @@ -38397,7 +39825,7 @@ def begin_list_routes_table( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCircuitsRoutesTableListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -38483,10 +39911,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionPeeringList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38540,7 +39968,7 @@ def get_next(next_link=None): def _delete_initial( self, resource_group_name: str, cross_connection_name: str, peering_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38551,7 +39979,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_cross_connection_peerings_delete_request( @@ -38607,7 +40035,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -38663,7 +40091,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteCrossConnectionPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38674,7 +40102,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteCrossConnectionPeering] = kwargs.pop("cls", None) _request = build_express_route_cross_connection_peerings_get_request( @@ -38714,7 +40142,7 @@ def _create_or_update_initial( peering_parameters: Union[_models.ExpressRouteCrossConnectionPeering, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -38725,7 +40153,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -38869,7 +40297,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteCrossConnectionPeering] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -38950,10 +40378,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.ExpressRoutePortsLocation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortsLocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39013,7 +40441,7 @@ def get(self, location_name: str, **kwargs: Any) -> _models.ExpressRoutePortsLoc :rtype: ~azure.mgmt.network.models.ExpressRoutePortsLocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39024,7 +40452,7 @@ def get(self, location_name: str, **kwargs: Any) -> _models.ExpressRoutePortsLoc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortsLocation] = kwargs.pop("cls", None) _request = build_express_route_ports_locations_get_request( @@ -39075,7 +40503,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, express_route_port_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39086,7 +40514,7 @@ def _delete_initial(self, resource_group_name: str, express_route_port_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_ports_delete_request( @@ -39144,7 +40572,7 @@ def begin_delete(self, resource_group_name: str, express_route_port_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -39195,7 +40623,7 @@ def get(self, resource_group_name: str, express_route_port_name: str, **kwargs: :rtype: ~azure.mgmt.network.models.ExpressRoutePort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39206,7 +40634,7 @@ def get(self, resource_group_name: str, express_route_port_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) _request = build_express_route_ports_get_request( @@ -39244,7 +40672,7 @@ def _create_or_update_initial( parameters: Union[_models.ExpressRoutePort, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39255,7 +40683,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -39382,7 +40810,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -39501,7 +40929,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ExpressRoutePort :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39512,7 +40940,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePort] = kwargs.pop("cls", None) @@ -39568,10 +40996,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39632,10 +41060,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.ExpressRoutePort"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39757,7 +41185,7 @@ def generate_loa( :rtype: ~azure.mgmt.network.models.GenerateExpressRoutePortsLOAResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39768,7 +41196,7 @@ def generate_loa( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GenerateExpressRoutePortsLOAResult] = kwargs.pop("cls", None) @@ -39847,7 +41275,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39858,7 +41286,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteLink] = kwargs.pop("cls", None) _request = build_express_route_links_get_request( @@ -39907,10 +41335,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteLinkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39984,7 +41412,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, express_route_port_name: str, authorization_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -39995,7 +41423,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_port_authorizations_delete_request( @@ -40058,7 +41486,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -40114,7 +41542,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRoutePortAuthorization :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40125,7 +41553,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortAuthorization] = kwargs.pop("cls", None) _request = build_express_route_port_authorizations_get_request( @@ -40165,7 +41593,7 @@ def _create_or_update_initial( authorization_parameters: Union[_models.ExpressRoutePortAuthorization, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40176,7 +41604,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -40317,7 +41745,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRoutePortAuthorization] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -40382,10 +41810,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRoutePortAuthorizationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40467,7 +41895,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> _models.Expres :rtype: ~azure.mgmt.network.models.ExpressRouteProviderPortListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40478,7 +41906,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> _models.Expres _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteProviderPortListResult] = kwargs.pop("cls", None) _request = build_express_route_provider_ports_location_list_request( @@ -40529,7 +41957,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40540,7 +41968,7 @@ def _delete_initial(self, resource_group_name: str, firewall_policy_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policies_delete_request( @@ -40591,7 +42019,7 @@ def begin_delete(self, resource_group_name: str, firewall_policy_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -40646,7 +42074,7 @@ def get( :rtype: ~azure.mgmt.network.models.FirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40657,7 +42085,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) _request = build_firewall_policies_get_request( @@ -40696,7 +42124,7 @@ def _create_or_update_initial( parameters: Union[_models.FirewallPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40707,7 +42135,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -40836,7 +42264,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -40955,7 +42383,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.FirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -40966,7 +42394,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicy] = kwargs.pop("cls", None) @@ -41022,10 +42450,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Fir _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41086,10 +42514,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.FirewallPolicy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41161,7 +42589,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, firewall_policy_name: str, rule_collection_group_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41172,7 +42600,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_groups_delete_request( @@ -41228,7 +42656,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -41284,7 +42712,7 @@ def get( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41295,7 +42723,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroup] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_groups_get_request( @@ -41335,7 +42763,7 @@ def _create_or_update_initial( parameters: Union[_models.FirewallPolicyRuleCollectionGroup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41346,7 +42774,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -41489,7 +42917,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyRuleCollectionGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -41555,10 +42983,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41704,7 +43132,7 @@ def list( :rtype: ~azure.mgmt.network.models.QueryResults :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41715,7 +43143,7 @@ def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.QueryResults] = kwargs.pop("cls", None) @@ -41851,7 +43279,7 @@ def patch( :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41862,7 +43290,7 @@ def patch( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) @@ -41978,7 +43406,7 @@ def put( :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -41989,7 +43417,7 @@ def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) @@ -42044,7 +43472,7 @@ def get(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any :rtype: ~azure.mgmt.network.models.SignaturesOverrides :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42055,7 +43483,7 @@ def get(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SignaturesOverrides] = kwargs.pop("cls", None) _request = build_firewall_policy_idps_signatures_overrides_get_request( @@ -42101,7 +43529,7 @@ def list( :rtype: ~azure.mgmt.network.models.SignaturesOverridesList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42112,7 +43540,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SignaturesOverridesList] = kwargs.pop("cls", None) _request = build_firewall_policy_idps_signatures_overrides_list_request( @@ -42236,7 +43664,7 @@ def list( :rtype: ~azure.mgmt.network.models.SignatureOverridesFilterValuesResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42247,7 +43675,7 @@ def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SignatureOverridesFilterValuesResponse] = kwargs.pop("cls", None) @@ -42385,7 +43813,7 @@ def create_or_update( :rtype: ~azure.mgmt.network.models.FirewallPolicyDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42396,7 +43824,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyDraft] = kwargs.pop("cls", None) @@ -42453,7 +43881,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42464,7 +43892,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_firewall_policy_drafts_delete_request( @@ -42503,7 +43931,7 @@ def get(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any :rtype: ~azure.mgmt.network.models.FirewallPolicyDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42514,7 +43942,7 @@ def get(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyDraft] = kwargs.pop("cls", None) _request = build_firewall_policy_drafts_get_request( @@ -42566,7 +43994,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _deploy_initial(self, resource_group_name: str, firewall_policy_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42577,7 +44005,7 @@ def _deploy_initial(self, resource_group_name: str, firewall_policy_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_firewall_policy_deployments_deploy_request( @@ -42634,7 +44062,7 @@ def begin_deploy(self, resource_group_name: str, firewall_policy_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -42709,7 +44137,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42720,7 +44148,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_group_drafts_delete_request( @@ -42834,7 +44262,7 @@ def create_or_update( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroupDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42845,7 +44273,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupDraft] = kwargs.pop("cls", None) @@ -42905,7 +44333,7 @@ def get( :rtype: ~azure.mgmt.network.models.FirewallPolicyRuleCollectionGroupDraft :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -42916,7 +44344,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FirewallPolicyRuleCollectionGroupDraft] = kwargs.pop("cls", None) _request = build_firewall_policy_rule_collection_group_drafts_get_request( @@ -42949,14 +44377,14 @@ def get( return deserialized # type: ignore -class IpAllocationsOperations: +class IpamPoolsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`ip_allocations` attribute. + :attr:`ipam_pools` attribute. """ models = _models @@ -42968,129 +44396,48 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_initial(self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_ip_allocations_delete_request( - resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - @distributed_trace - def begin_delete(self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified IpAllocation. + def list( + self, + resource_group_name: str, + network_manager_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IpamPool"]: + """Gets list of Pool resources at Network Manager level. + + Gets list of Pool resources at Network Manager level. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either IpamPool or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpamPoolList] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43098,49 +44445,64 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + _request = build_ipam_pools_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - _request = build_ip_allocations_get_request( - resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def extract_data(pipeline_response): + deserialized = self._deserialize("IpamPoolList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) - response = pipeline_response.http_response + def get_next(next_link=None): + _request = prepare_request(next_link) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - deserialized = self._deserialize("IpAllocation", 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) - def _create_or_update_initial( + def _create_initial( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.IpAllocation, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Union[_models.IpamPool, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43151,21 +44513,22 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(parameters, "IpAllocation") + _json = self._serialize.body(body, "IpamPool") - _request = build_ip_allocations_create_or_update_request( + _request = build_ipam_pools_create_request( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -43190,107 +44553,125 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: _models.IpAllocation, + network_manager_name: str, + pool_name: str, + body: _models.IpamPool, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> LROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - Required. - :type parameters: ~azure.mgmt.network.models.IpAllocation + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Required. + :type body: ~azure.mgmt.network.models.IpamPool :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either IpAllocation or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] + :return: An instance of LROPoller that returns either IpamPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: IO[bytes], + network_manager_name: str, + pool_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> LROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Required. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either IpAllocation or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] + :return: An instance of LROPoller that returns either IpamPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_or_update( + def begin_create( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.IpAllocation, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Union[_models.IpamPool, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.IpAllocation]: - """Creates or updates an IpAllocation in the specified resource group. + ) -> LROPoller[_models.IpamPool]: + """Creates/Updates the Pool resource. + + Creates/Updates the Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. Is - either a IpAllocation type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.IpAllocation or IO[bytes] - :return: An instance of LROPoller that returns either IpAllocation or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to create/update. Is either a IpamPool type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.network.models.IpamPool or IO[bytes] + :return: An instance of LROPoller that returns either IpamPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpamPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, - parameters=parameters, + network_manager_name=network_manager_name, + pool_name=pool_name, + body=body, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, @@ -43302,7 +44683,7 @@ def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -43316,90 +44697,105 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.IpAllocation].from_continuation_token( + return LROPoller[_models.IpamPool].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.IpAllocation]( + return LROPoller[_models.IpamPool]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload - def update_tags( + def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: _models.TagsObject, + network_manager_name: str, + pool_name: str, + body: Optional[_models.IpamPoolUpdate] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Default value is None. + :type body: ~azure.mgmt.network.models.IpamPoolUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update_tags( + def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: IO[bytes], + network_manager_name: str, + pool_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Default value is None. + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def update_tags( + def update( self, resource_group_name: str, - ip_allocation_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], + network_manager_name: str, + pool_name: str, + body: Optional[Union[_models.IpamPoolUpdate, IO[bytes]]] = None, **kwargs: Any - ) -> _models.IpAllocation: - """Updates a IpAllocation tags. + ) -> _models.IpamPool: + """Updates the specific Pool resource. + + Updates the specific Pool resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_allocation_name: The name of the IpAllocation. Required. - :type ip_allocation_name: str - :param parameters: Parameters supplied to update IpAllocation tags. Is either a TagsObject type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: IpAllocation or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpAllocation + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param body: Pool resource object to update partially. Is either a IpamPoolUpdate type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.IpamPoolUpdate or IO[bytes] + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43410,21 +44806,25 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(body, (IOBase, bytes)): + _content = body else: - _json = self._serialize.body(parameters, "TagsObject") + if body is not None: + _json = self._serialize.body(body, "IpamPoolUpdate") + else: + _json = None - _request = build_ip_allocations_update_tags_request( + _request = build_ipam_pools_update_request( resource_group_name=resource_group_name, - ip_allocation_name=ip_allocation_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -43444,9 +44844,10 @@ def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -43454,20 +44855,271 @@ def update_tags( return deserialized # type: ignore @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.IpAllocation"]: - """Gets all IpAllocations in a subscription. + def get( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> _models.IpamPool: + """Gets the specific Pool resource. - :return: An iterator like instance of either IpAllocation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpAllocation] + Gets the specific Pool resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: IpamPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpamPool :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpamPool] = kwargs.pop("cls", None) + + _request = build_ipam_pools_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("IpamPool", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ipam_pools_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete the Pool resource. + + Delete the Pool resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def get_pool_usage( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> _models.PoolUsage: + """Get the Pool Usage. + + Get the Pool Usage. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: PoolUsage or the result of cls(response) + :rtype: ~azure.mgmt.network.models.PoolUsage + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.PoolUsage] = kwargs.pop("cls", None) + + _request = build_ipam_pools_get_pool_usage_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + deserialized = self._deserialize("PoolUsage", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_associated_resources( + self, resource_group_name: str, network_manager_name: str, pool_name: str, **kwargs: Any + ) -> Iterable["_models.PoolAssociation"]: + """List Associated Resource in the Pool. + + List Associated Resource in the Pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :return: An iterator like instance of either PoolAssociation or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.PoolAssociation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.PoolAssociationList] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43478,7 +45130,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.IpAllocation"]: def prepare_request(next_link=None): if not next_link: - _request = build_ip_allocations_list_request( + _request = build_ipam_pools_list_associated_resources_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -43493,7 +45148,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + deserialized = self._deserialize("PoolAssociationList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -43510,29 +45165,78 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + +class StaticCidrsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`static_cidrs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpAllocation"]: - """Gets all IpAllocations in a resource group. + def list( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.StaticCidr"]: + """Gets list of Static CIDR resources at Network Manager level. + + Gets list of Static CIDR resources at Network Manager level. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either IpAllocation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpAllocation] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either StaticCidr or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.StaticCidr] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticCidrList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43543,9 +45247,16 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - _request = build_ip_allocations_list_by_resource_group_request( + _request = build_static_cidrs_list_request( resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, api_version=api_version, headers=_headers, params=_params, @@ -43559,7 +45270,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + deserialized = self._deserialize("StaticCidrList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -43576,50 +45287,111 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[_models.StaticCidr] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. -class IpGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + Creates/Updates the Static CIDR resource. - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`ip_groups` attribute. - """ + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Default value is None. + :type body: ~azure.mgmt.network.models.StaticCidr + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ - models = _models + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + Creates/Updates the Static CIDR resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ @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. + def create( + self, + resource_group_name: str, + network_manager_name: str, + pool_name: str, + static_cidr_name: str, + body: Optional[Union[_models.StaticCidr, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.StaticCidr: + """Creates/Updates the Static CIDR resource. + + Creates/Updates the Static CIDR resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :keyword expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back - referenced by the IpGroups resource. Default value is None. - :paramtype expand: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: IP Address Manager Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: Static Cidr allocation name. Required. + :type static_cidr_name: str + :param body: StaticCidr resource object to create/update. Is either a StaticCidr type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.StaticCidr or IO[bytes] + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43627,18 +45399,34 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StaticCidr] = kwargs.pop("cls", None) - _request = build_ip_groups_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "StaticCidr") + else: + _json = None + + _request = build_static_cidrs_create_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, subscription_id=self._config.subscription_id, - expand=expand, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -43651,26 +45439,39 @@ def get( response = pipeline_response.http_response - if response.status_code not in [200]: + 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.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpGroup", pipeline_response.http_response) + deserialized = self._deserialize("StaticCidr", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_or_update_initial( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.IpGroup, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @distributed_trace + def get( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> _models.StaticCidr: + """Gets the specific Static CIDR resource. + + Gets the specific Static CIDR resource. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: StaticCidr resource name to retrieve. Required. + :type static_cidr_name: str + :return: StaticCidr or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticCidr + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43678,284 +45479,19 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IpGroup") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticCidr] = kwargs.pop("cls", None) - _request = build_ip_groups_create_or_update_request( + _request = build_static_cidrs_get_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, subscription_id=self._config.subscription_id, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - 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 = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: _models.IpGroup, - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Required. - :type parameters: ~azure.mgmt.network.models.IpGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.IpGroup, IO[bytes]], - **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. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the create or update IpGroups operation. Is either a - IpGroup type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.IpGroup or IO[bytes] - :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update_groups( - self, - resource_group_name: str, - ip_groups_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.IpGroup: - """Updates tags of an IpGroups resource. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str - :param parameters: Parameters supplied to the update ipGroups operation. Is either a TagsObject - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: IpGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.IpGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _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, - content=_content, headers=_headers, params=_params, ) @@ -43970,18 +45506,20 @@ def update_groups( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpGroup", pipeline_response.http_response) + deserialized = self._deserialize("StaticCidr", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial(self, resource_group_name: str, ip_groups_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _delete_initial( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -43992,12 +45530,14 @@ def _delete_initial(self, resource_group_name: str, ip_groups_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_ip_groups_delete_request( + _request = build_static_cidrs_delete_request( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -44013,30 +45553,42 @@ def _delete_initial(self, resource_group_name: str, ip_groups_name: str, **kwarg response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def begin_delete(self, resource_group_name: str, ip_groups_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified ipGroups. + def begin_delete( + self, resource_group_name: str, network_manager_name: str, pool_name: str, static_cidr_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete the Static CIDR resource. + + Delete the Static CIDR resource. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param ip_groups_name: The name of the ipGroups. Required. - :type ip_groups_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param pool_name: Pool resource name. Required. + :type pool_name: str + :param static_cidr_name: StaticCidr resource name to delete. Required. + :type static_cidr_name: str :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: @@ -44044,7 +45596,7 @@ def begin_delete(self, resource_group_name: str, ip_groups_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -44052,7 +45604,9 @@ def begin_delete(self, resource_group_name: str, ip_groups_name: str, **kwargs: if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - ip_groups_name=ip_groups_name, + network_manager_name=network_manager_name, + pool_name=pool_name, + static_cidr_name=static_cidr_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -44083,146 +45637,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpGroup"]: - """Gets all IpGroups in a resource group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :return: An iterator like instance of either IpGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = 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) - - @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.IpGroup"]: - """Gets all IpGroups in a subscription. - - :return: An iterator like instance of either IpGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = 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) - -class LoadBalancersOperations: +class IpAllocationsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancers` attribute. + :attr:`ip_allocations` attribute. """ models = _models @@ -44234,8 +45657,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_initial(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _delete_initial(self, resource_group_name: str, ip_allocation_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44246,12 +45669,12 @@ def _delete_initial(self, resource_group_name: str, load_balancer_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_load_balancers_delete_request( + _request = build_ip_allocations_delete_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -44275,21 +45698,25 @@ def _delete_initial(self, resource_group_name: str, load_balancer_name: str, **k map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def begin_delete(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified load balancer. + def begin_delete(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. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str :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: @@ -44297,7 +45724,7 @@ def begin_delete(self, resource_group_name: str, load_balancer_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -44305,7 +45732,7 @@ def begin_delete(self, resource_group_name: str, load_balancer_name: str, **kwar if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -44338,21 +45765,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str :keyword expand: Expands referenced resources. Default value is None. :paramtype expand: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44363,12 +45790,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) - _request = build_load_balancers_get_request( + _request = build_ip_allocations_get_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, expand=expand, api_version=api_version, @@ -44388,7 +45815,7 @@ def get( 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.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -44398,11 +45825,11 @@ def get( def _create_or_update_initial( self, resource_group_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], + ip_allocation_name: str, + parameters: Union[_models.IpAllocation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44413,7 +45840,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -44423,11 +45850,11 @@ def _create_or_update_initial( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "LoadBalancer") + _json = self._serialize.body(parameters, "IpAllocation") - _request = build_load_balancers_create_or_update_request( + _request = build_ip_allocations_create_or_update_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -44465,27 +45892,27 @@ def _create_or_update_initial( def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: _models.LoadBalancer, + ip_allocation_name: str, + parameters: _models.IpAllocation, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> LROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancer + :type parameters: ~azure.mgmt.network.models.IpAllocation :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either LoadBalancer or the result of + :return: An instance of LROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -44493,27 +45920,27 @@ def begin_create_or_update( def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> LROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either LoadBalancer or the result of + :return: An instance of LROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -44521,37 +45948,37 @@ def begin_create_or_update( def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], + ip_allocation_name: str, + parameters: Union[_models.IpAllocation, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.LoadBalancer]: - """Creates or updates a load balancer. + ) -> LROPoller[_models.IpAllocation]: + """Creates or updates an IpAllocation in the specified resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. Is - either a LoadBalancer type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancer or IO[bytes] - :return: An instance of LROPoller that returns either LoadBalancer or the result of + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. Is + either a IpAllocation type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.IpAllocation or IO[bytes] + :return: An instance of LROPoller that returns either IpAllocation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, parameters=parameters, api_version=api_version, content_type=content_type, @@ -44564,7 +45991,7 @@ def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -44578,13 +46005,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.LoadBalancer].from_continuation_token( + return LROPoller[_models.IpAllocation].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.LoadBalancer]( + return LROPoller[_models.IpAllocation]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -44592,25 +46019,25 @@ def get_long_running_output(pipeline_response): def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Required. :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ @@ -44618,25 +46045,25 @@ def update_tags( def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ @@ -44644,24 +46071,24 @@ def update_tags( def update_tags( self, resource_group_name: str, - load_balancer_name: str, + ip_allocation_name: str, parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.LoadBalancer: - """Updates a load balancer tags. + ) -> _models.IpAllocation: + """Updates a IpAllocation tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. Is either a TagsObject - type or a IO[bytes] type. Required. + :param ip_allocation_name: The name of the IpAllocation. Required. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. Is either a TagsObject type + or a IO[bytes] type. Required. :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancer + :return: IpAllocation or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpAllocation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44672,9 +46099,9 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.IpAllocation] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -44684,9 +46111,9 @@ def update_tags( else: _json = self._serialize.body(parameters, "TagsObject") - _request = build_load_balancers_update_tags_request( + _request = build_ip_allocations_update_tags_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + ip_allocation_name=ip_allocation_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -44708,7 +46135,7 @@ def update_tags( 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.http_response) + deserialized = self._deserialize("IpAllocation", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -44716,20 +46143,20 @@ def update_tags( return deserialized # type: ignore @distributed_trace - def list_all(self, **kwargs: Any) -> Iterable["_models.LoadBalancer"]: - """Gets all the load balancers in a subscription. + def list(self, **kwargs: Any) -> Iterable["_models.IpAllocation"]: + """Gets all IpAllocations in a subscription. - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] + :return: An iterator like instance of either IpAllocation or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44740,7 +46167,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.LoadBalancer"]: def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_all_request( + _request = build_ip_allocations_list_request( subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -44755,7 +46182,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -44779,22 +46206,22 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.LoadBalancer"]: - """Gets all the load balancers in a resource group. + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpAllocation"]: + """Gets all IpAllocations in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] + :return: An iterator like instance of either IpAllocation or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpAllocation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpAllocationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44805,7 +46232,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Loa def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_request( + _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, @@ -44821,7 +46248,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -44844,10 +46271,44 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - def _swap_public_ip_addresses_initial( - self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + +class IpGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`ip_groups` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @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. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :keyword expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back + referenced by the IpGroups resource. Default value is None. + :paramtype expand: str + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -44855,165 +46316,50 @@ def _swap_public_ip_addresses_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoadBalancerVipSwapRequest") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) - _request = build_load_balancers_swap_public_ip_addresses_request( - location=location, + _request = build_ip_groups_get_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, subscription_id=self._config.subscription_id, + expand=expand, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def begin_swap_public_ip_addresses( - self, - location: str, - parameters: _models.LoadBalancerVipSwapRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @overload - def begin_swap_public_ip_addresses( - self, location: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @distributed_trace - def begin_swap_public_ip_addresses( - self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any - ) -> LROPoller[None]: - """Swaps VIPs between two load balancers. - - :param location: The region where load balancers are located at. Required. - :type location: str - :param parameters: Parameters that define which VIPs should be swapped. Is either a - LoadBalancerVipSwapRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest or IO[bytes] - :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: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-long + def _create_or_update_initial( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.IpGroup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45024,7 +46370,7 @@ def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -45034,12 +46380,11 @@ def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-lo if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "QueryInboundNatRulePortMappingRequest") + _json = self._serialize.body(parameters, "IpGroup") - _request = build_load_balancers_list_inbound_nat_rule_port_mappings_request( - group_name=group_name, - load_balancer_name=load_balancer_name, - backend_pool_name=backend_pool_name, + _request = build_ip_groups_create_or_update_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, @@ -45058,13 +46403,14 @@ def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-lo response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -45074,107 +46420,91 @@ def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-lo return deserialized # type: ignore @overload - def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: _models.QueryInboundNatRulePortMappingRequest, + resource_group_name: str, + ip_groups_name: str, + parameters: _models.IpGroup, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> LROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Required. - :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Required. + :type parameters: ~azure.mgmt.network.models.IpGroup :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, + resource_group_name: str, + ip_groups_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> LROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Required. + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long + def begin_create_or_update( self, - group_name: str, - load_balancer_name: str, - backend_pool_name: str, - parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.IpGroup, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: - """List of inbound NAT rule port mappings. + ) -> LROPoller[_models.IpGroup]: + """Creates or updates an ipGroups in a specified resource group. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_pool_name: The name of the load balancer backend address pool. Required. - :type backend_pool_name: str - :param parameters: Query inbound NAT rule port mapping request. Is either a - QueryInboundNatRulePortMappingRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest or IO[bytes] - :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. Is either a + IpGroup type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.IpGroup or IO[bytes] + :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.IpGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendAddressInboundNatRulePortMappings] = kwargs.pop("cls", None) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, @@ -45187,106 +46517,104 @@ def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BackendAddressInboundNatRulePortMappings", pipeline_response.http_response - ) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.BackendAddressInboundNatRulePortMappings].from_continuation_token( + return LROPoller[_models.IpGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackendAddressInboundNatRulePortMappings]( + return LROPoller[_models.IpGroup]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload - def migrate_to_ip_based( + def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[_models.MigrateLoadBalancerToIpBasedRequest] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. - :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def migrate_to_ip_based( + def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[IO[bytes]] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def migrate_to_ip_based( + def update_groups( self, - group_name: str, - load_balancer_name: str, - parameters: Optional[Union[_models.MigrateLoadBalancerToIpBasedRequest, IO[bytes]]] = None, + resource_group_name: str, + ip_groups_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.MigratedPools: - """Migrate load balancer to IP Based. + ) -> _models.IpGroup: + """Updates tags of an IpGroups resource. - :param group_name: The name of the resource group. Required. - :type group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: Parameters supplied to the migrateToIpBased Api. Is either a - MigrateLoadBalancerToIpBasedRequest type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest or IO[bytes] - :return: MigratedPools or the result of cls(response) - :rtype: ~azure.mgmt.network.models.MigratedPools + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: IpGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.IpGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45297,9 +46625,9 @@ def migrate_to_ip_based( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigratedPools] = kwargs.pop("cls", None) + cls: ClsType[_models.IpGroup] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -45307,14 +46635,11 @@ def migrate_to_ip_based( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - if parameters is not None: - _json = self._serialize.body(parameters, "MigrateLoadBalancerToIpBasedRequest") - else: - _json = None + _json = self._serialize.body(parameters, "TagsObject") - _request = build_load_balancers_migrate_to_ip_based_request( - group_name=group_name, - load_balancer_name=load_balancer_name, + _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, @@ -45334,56 +46659,136 @@ def migrate_to_ip_based( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("MigratedPools", pipeline_response.http_response) + deserialized = self._deserialize("IpGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + def _delete_initial(self, resource_group_name: str, ip_groups_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) -class LoadBalancerBackendAddressPoolsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_backend_address_pools` attribute. - """ + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - models = _models + _request = build_ip_groups_delete_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + 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 = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.BackendAddressPool"]: - """Gets all the load balancer backed address pools. + def begin_delete(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. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either BackendAddressPool or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.BackendAddressPool] + :param ip_groups_name: The name of the ipGroups. Required. + :type ip_groups_name: str + :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: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerBackendAddressPoolListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpGroup"]: + """Gets all IpGroups in a resource group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :return: An iterator like instance of either IpGroup or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45394,9 +46799,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_backend_address_pools_list_request( + _request = build_ip_groups_list_by_resource_group_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -45411,7 +46815,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) + deserialized = self._deserialize("IpGroupListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -45428,29 +46832,216 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + 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) + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.IpGroup"]: + """Gets all IpGroups in a subscription. + + :return: An iterator like instance of either IpGroup or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.IpGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.IpGroupListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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) + +class LoadBalancersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancers` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _delete_initial(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_load_balancers_delete_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(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. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. + 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. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :return: BackendAddressPool or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BackendAddressPool + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45461,14 +47052,14 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - _request = build_load_balancer_backend_address_pools_get_request( + _request = build_load_balancers_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, + expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -45486,7 +47077,7 @@ def get( 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.http_response) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -45497,11 +47088,10 @@ def _create_or_update_initial( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: Union[_models.BackendAddressPool, IO[bytes]], + parameters: Union[_models.LoadBalancer, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45512,7 +47102,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -45522,12 +47112,11 @@ def _create_or_update_initial( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "BackendAddressPool") + _json = self._serialize.body(parameters, "LoadBalancer") - _request = build_load_balancer_backend_address_pools_create_or_update_request( + _request = build_load_balancers_create_or_update_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, content_type=content_type, @@ -45566,29 +47155,26 @@ def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: _models.BackendAddressPool, + parameters: _models.LoadBalancer, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> LROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Required. - :type parameters: ~azure.mgmt.network.models.BackendAddressPool + :param parameters: Parameters supplied to the create or update load balancer operation. + Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancer :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either BackendAddressPool or the result of + :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -45597,29 +47183,26 @@ def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> LROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Required. + :param parameters: Parameters supplied to the create or update load balancer operation. + Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either BackendAddressPool or the result of + :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -45628,32 +47211,29 @@ def begin_create_or_update( self, resource_group_name: str, load_balancer_name: str, - backend_address_pool_name: str, - parameters: Union[_models.BackendAddressPool, IO[bytes]], + parameters: Union[_models.LoadBalancer, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.BackendAddressPool]: - """Creates or updates a load balancer backend address pool. + ) -> LROPoller[_models.LoadBalancer]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :param parameters: Parameters supplied to the create or update load balancer backend address - pool operation. Is either a BackendAddressPool type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.BackendAddressPool or IO[bytes] - :return: An instance of LROPoller that returns either BackendAddressPool or the result of + :param parameters: Parameters supplied to the create or update load balancer operation. Is + either a LoadBalancer type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancer or IO[bytes] + :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -45661,7 +47241,6 @@ def begin_create_or_update( 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, @@ -45674,7 +47253,7 @@ def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -45688,20 +47267,90 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.BackendAddressPool].from_continuation_token( + return LROPoller[_models.LoadBalancer].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackendAddressPool]( + return LROPoller[_models.LoadBalancer]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( - self, resource_group_name: str, load_balancer_name: str, backend_address_pool_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @overload + def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.LoadBalancer: + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: LoadBalancer or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45709,40 +47358,46 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - _request = build_load_balancer_backend_address_pools_delete_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, - backend_address_pool_name=backend_address_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -45750,106 +47405,20 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - def begin_delete( - 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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. Required. - :type backend_address_pool_name: str - :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: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class LoadBalancerFrontendIPConfigurationsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_frontend_ip_configurations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.FrontendIPConfiguration"]: - """Gets all the load balancer frontend IP configurations. + def list_all(self, **kwargs: Any) -> Iterable["_models.LoadBalancer"]: + """Gets all the load balancers in a subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either FrontendIPConfiguration or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.FrontendIPConfiguration] + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerFrontendIPConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -45860,9 +47429,7 @@ def list( 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, + _request = build_load_balancers_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -45877,7 +47444,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerFrontendIPConfigurationListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -45901,105 +47468,22 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. Required. - :type frontend_ip_configuration_name: str - :return: FrontendIPConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.FrontendIPConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.FrontendIPConfiguration] = kwargs.pop("cls", None) - - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class InboundNatRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`inbound_nat_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.InboundNatRule"]: - """Gets all the inbound NAT rules in a load balancer. + def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.LoadBalancer"]: + """Gets all the load balancers in a resource group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.InboundNatRule] + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.InboundNatRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46010,9 +47494,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_inbound_nat_rules_list_request( + _request = build_load_balancers_list_request( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -46027,7 +47510,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("InboundNatRuleListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -46050,10 +47533,10 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - def _delete_initial( - self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any + def _swap_public_ip_addresses_initial( + self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46061,18 +47544,28 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_inbound_nat_rules_delete_request( - resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "LoadBalancerVipSwapRequest") + + _request = build_load_balancers_swap_public_ip_addresses_request( + location=location, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -46086,7 +47579,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -46101,36 +47594,77 @@ def _delete_initial( return deserialized # type: ignore + @overload + def begin_swap_public_ip_addresses( + self, + location: str, + parameters: _models.LoadBalancerVipSwapRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @overload + def begin_swap_public_ip_addresses( + self, location: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + @distributed_trace - def begin_delete( - self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any + def begin_swap_public_ip_addresses( + self, location: str, parameters: Union[_models.LoadBalancerVipSwapRequest, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: - """Deletes the specified load balancer inbound NAT rule. + """Swaps VIPs between two load balancers. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str + :param location: The region where load balancers are located at. Required. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. Is either a + LoadBalancerVipSwapRequest type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.LoadBalancerVipSwapRequest or IO[bytes] :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: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, headers=_headers, params=_params, @@ -46160,83 +47694,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: InboundNatRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.InboundNatRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) - - _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, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( + def _list_inbound_nat_rule_port_mappings_initial( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], + backend_pool_name: str, + parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46247,22 +47713,22 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(inbound_nat_rule_parameters, (IOBase, bytes)): - _content = inbound_nat_rule_parameters + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(inbound_nat_rule_parameters, "InboundNatRule") + _json = self._serialize.body(parameters, "QueryInboundNatRulePortMappingRequest") - _request = build_inbound_nat_rules_create_or_update_request( - resource_group_name=resource_group_name, + _request = build_load_balancers_list_inbound_nat_rule_port_mappings_request( + group_name=group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + backend_pool_name=backend_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -46281,7 +47747,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -46297,107 +47763,108 @@ def _create_or_update_initial( return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: _models.InboundNatRule, + backend_pool_name: str, + parameters: _models.QueryInboundNatRulePortMappingRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Required. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Required. + :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] + :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: IO[bytes], + backend_pool_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Required. - :type inbound_nat_rule_parameters: IO[bytes] + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] + :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_or_update( + def begin_list_inbound_nat_rule_port_mappings( # pylint: disable=name-too-long self, - resource_group_name: str, + group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], + backend_pool_name: str, + parameters: Union[_models.QueryInboundNatRulePortMappingRequest, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.InboundNatRule]: - """Creates or updates a load balancer inbound NAT rule. + ) -> LROPoller[_models.BackendAddressInboundNatRulePortMappings]: + """List of inbound NAT rule port mappings. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT - rule operation. Is either a InboundNatRule type or a IO[bytes] type. Required. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule or IO[bytes] - :return: An instance of LROPoller that returns either InboundNatRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] + :param backend_pool_name: The name of the load balancer backend address pool. Required. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. Is either a + QueryInboundNatRulePortMappingRequest type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.QueryInboundNatRulePortMappingRequest or IO[bytes] + :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) + cls: ClsType[_models.BackendAddressInboundNatRulePortMappings] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, + raw_result = self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + backend_pool_name=backend_pool_name, + parameters=parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, @@ -46409,221 +47876,106 @@ def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) + deserialized = self._deserialize( + "BackendAddressInboundNatRulePortMappings", pipeline_response.http_response + ) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.InboundNatRule].from_continuation_token( + return LROPoller[_models.BackendAddressInboundNatRulePortMappings].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.InboundNatRule]( + return LROPoller[_models.BackendAddressInboundNatRulePortMappings]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @overload + def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[_models.MigrateLoadBalancerToIpBasedRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. -class LoadBalancerLoadBalancingRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_load_balancing_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.LoadBalancingRule"]: - """Gets all the load balancing rules in a load balancer. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either LoadBalancingRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancingRule] + :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerLoadBalancingRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - @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. + @overload + def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. Required. - :type load_balancing_rule_name: str - :return: LoadBalancingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.LoadBalancingRule + :param parameters: Parameters supplied to the migrateToIpBased Api. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancingRule] = kwargs.pop("cls", None) - - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class LoadBalancerOutboundRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_outbound_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.OutboundRule"]: - """Gets all the outbound rules in a load balancer. + def migrate_to_ip_based( + self, + group_name: str, + load_balancer_name: str, + parameters: Optional[Union[_models.MigrateLoadBalancerToIpBasedRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.MigratedPools: + """Migrate load balancer to IP Based. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str + :param group_name: The name of the resource group. Required. + :type group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either OutboundRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.OutboundRule] + :param parameters: Parameters supplied to the migrateToIpBased Api. Is either a + MigrateLoadBalancerToIpBasedRequest type or a IO[bytes] type. Default value is None. + :type parameters: ~azure.mgmt.network.models.MigrateLoadBalancerToIpBasedRequest or IO[bytes] + :return: MigratedPools or the result of cls(response) + :rtype: ~azure.mgmt.network.models.MigratedPools :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerOutboundRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46631,85 +47983,32 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigratedPools] = kwargs.pop("cls", None) + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _json = self._serialize.body(parameters, "MigrateLoadBalancerToIpBasedRequest") else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - @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. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param outbound_rule_name: The name of the outbound rule. Required. - :type outbound_rule_name: str - :return: OutboundRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.OutboundRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.OutboundRule] = kwargs.pop("cls", None) + _json = None - _request = build_load_balancer_outbound_rules_get_request( - resource_group_name=resource_group_name, + _request = build_load_balancers_migrate_to_ip_based_request( + group_name=group_name, load_balancer_name=load_balancer_name, - outbound_rule_name=outbound_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -46726,7 +48025,7 @@ def get( 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.http_response) + deserialized = self._deserialize("MigratedPools", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -46734,14 +48033,14 @@ def get( return deserialized # type: ignore -class LoadBalancerNetworkInterfacesOperations: +class LoadBalancerBackendAddressPoolsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_network_interfaces` attribute. + :attr:`load_balancer_backend_address_pools` attribute. """ models = _models @@ -46756,113 +48055,24 @@ def __init__(self, *args, **kwargs): @distributed_trace def list( self, resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkInterface"]: - """Gets associated load balancer network interfaces. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An iterator like instance of either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class LoadBalancerProbesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`load_balancer_probes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> Iterable["_models.Probe"]: - """Gets all the load balancer probes. + ) -> Iterable["_models.BackendAddressPool"]: + """Gets all the load balancer backed address pools. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :return: An iterator like instance of either Probe or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.Probe] + :return: An iterator like instance of either BackendAddressPool or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.BackendAddressPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.LoadBalancerProbeListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerBackendAddressPoolListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46873,7 +48083,7 @@ def list(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) def prepare_request(next_link=None): if not next_link: - _request = build_load_balancer_probes_list_request( + _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, @@ -46890,7 +48100,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerProbeListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -46914,20 +48124,22 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def get(self, resource_group_name: str, load_balancer_name: str, probe_name: str, **kwargs: Any) -> _models.Probe: - """Gets load balancer probe. + 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. Required. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. Required. :type load_balancer_name: str - :param probe_name: The name of the probe. Required. - :type probe_name: str - :return: Probe or the result of cls(response) - :rtype: ~azure.mgmt.network.models.Probe + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :return: BackendAddressPool or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BackendAddressPool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46938,13 +48150,13 @@ def get(self, resource_group_name: str, load_balancer_name: str, probe_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.Probe] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) - _request = build_load_balancer_probes_get_request( + _request = build_load_balancer_backend_address_pools_get_request( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - probe_name=probe_name, + backend_address_pool_name=backend_address_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -46963,35 +48175,22 @@ def get(self, resource_group_name: str, load_balancer_name: str, probe_name: str 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.http_response) + deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - -class NatGatewaysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`nat_gateways` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _delete_initial(self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: Union[_models.BackendAddressPool, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -46999,17 +48198,30 @@ def _delete_initial(self, resource_group_name: str, nat_gateway_name: str, **kwa } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_nat_gateways_delete_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "BackendAddressPool") + + _request = build_load_balancer_backend_address_pools_create_or_update_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, + content=_content, headers=_headers, params=_params, ) @@ -47023,7 +48235,7 @@ def _delete_initial(self, resource_group_name: str, nat_gateway_name: str, **kwa response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -47038,31 +48250,110 @@ def _delete_initial(self, resource_group_name: str, nat_gateway_name: str, **kwa return deserialized # type: ignore - @distributed_trace - def begin_delete(self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified nat gateway. + @overload + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: _models.BackendAddressPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :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: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Required. + :type parameters: ~azure.mgmt.network.models.BackendAddressPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: Union[_models.BackendAddressPool, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BackendAddressPool]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. Is either a BackendAddressPool type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.BackendAddressPool or IO[bytes] + :return: An instance of LROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.BackendAddressPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendAddressPool] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, headers=_headers, params=_params, @@ -47071,94 +48362,35 @@ def begin_delete(self, resource_group_name: str, nat_gateway_name: str, **kwargs raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("BackendAddressPool", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.BackendAddressPool].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) - - _request = build_nat_gateways_get_request( - resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + return LROPoller[_models.BackendAddressPool]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.NatGateway, IO[bytes]], - **kwargs: Any + def _delete_initial( + self, resource_group_name: str, load_balancer_name: str, backend_address_pool_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47166,29 +48398,18 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NatGateway") - - _request = build_nat_gateways_create_or_update_request( + _request = build_load_balancer_backend_address_pools_delete_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, - content=_content, headers=_headers, params=_params, ) @@ -47202,7 +48423,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -47217,95 +48438,36 @@ def _create_or_update_initial( return deserialized # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: _models.NatGateway, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Required. - :type parameters: ~azure.mgmt.network.models.NatGateway - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.NatGateway, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NatGateway]: - """Creates or updates a nat gateway. + def begin_delete( + 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. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to the create or update nat gateway operation. Is either - a NatGateway type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NatGateway or IO[bytes] - :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. Required. + :type backend_address_pool_name: str + :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: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_name, - parameters=parameters, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, api_version=api_version, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -47314,105 +48476,136 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NatGateway", pipeline_response.http_response) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.NatGateway].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.NatGateway]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @overload - def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ +class LoadBalancerFrontendIPConfigurationsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancer_frontend_ip_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterable["_models.FrontendIPConfiguration"]: + """Gets all the load balancer frontend IP configurations. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either FrontendIPConfiguration or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.FrontendIPConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerFrontendIPConfigurationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) @distributed_trace - def update_tags( - self, - resource_group_name: str, - nat_gateway_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.NatGateway: - """Updates nat gateway tags. + 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. Required. :type resource_group_name: str - :param nat_gateway_name: The name of the nat gateway. Required. - :type nat_gateway_name: str - :param parameters: Parameters supplied to update nat gateway tags. Is either a TagsObject type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NatGateway or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NatGateway + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param frontend_ip_configuration_name: The name of the frontend IP configuration. Required. + :type frontend_ip_configuration_name: str + :return: FrontendIPConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.FrontendIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47420,29 +48613,18 @@ def update_tags( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagsObject") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.FrontendIPConfiguration] = kwargs.pop("cls", None) - _request = build_nat_gateways_update_tags_request( + _request = build_load_balancer_frontend_ip_configurations_get_request( resource_group_name=resource_group_name, - nat_gateway_name=nat_gateway_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, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -47459,28 +48641,54 @@ def update_tags( 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.http_response) + deserialized = self._deserialize("FrontendIPConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + +class InboundNatRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`inbound_nat_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def list_all(self, **kwargs: Any) -> Iterable["_models.NatGateway"]: - """Gets all the Nat Gateways in a subscription. + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterable["_models.InboundNatRule"]: + """Gets all the inbound NAT rules in a load balancer. - :return: An iterator like instance of either NatGateway or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NatGateway] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either InboundNatRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.InboundNatRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47491,7 +48699,9 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.NatGateway"]: def prepare_request(next_link=None): if not next_link: - _request = build_nat_gateways_list_all_request( + _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, headers=_headers, @@ -47506,7 +48716,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + deserialized = self._deserialize("InboundNatRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -47529,339 +48739,10 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NatGateway"]: - """Gets all nat gateways in a resource group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :return: An iterator like instance of either NatGateway or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NatGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class NetworkInterfaceIPConfigurationsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_interface_ip_configurations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkInterfaceIPConfiguration"]: - """Get all ip configurations in a network interface. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either NetworkInterfaceIPConfiguration or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterfaceIPConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - @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. Required. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. Required. - :type ip_configuration_name: str - :return: NetworkInterfaceIPConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceIPConfiguration] = kwargs.pop("cls", None) - - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class NetworkInterfaceLoadBalancersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_interface_load_balancers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> Iterable["_models.LoadBalancer"]: - """List all load balancers in a network interface. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceLoadBalancerListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class NetworkInterfaceTapConfigurationsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_interface_tap_configurations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_initial( - self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47872,13 +48753,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_interface_tap_configurations_delete_request( + _request = build_inbound_nat_rules_delete_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_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, headers=_headers, @@ -47911,16 +48792,16 @@ def _delete_initial( @distributed_trace def begin_delete( - self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + self, resource_group_name: str, load_balancer_name: str, inbound_nat_rule_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes the specified tap configuration from the NetworkInterface. + """Deletes the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str :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: @@ -47928,7 +48809,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -47936,8 +48817,8 @@ def begin_delete( 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, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -47970,21 +48851,29 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @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. + 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. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :return: NetworkInterfaceTapConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: InboundNatRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.InboundNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -47995,14 +48884,15 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) - _request = build_network_interface_tap_configurations_get_request( + _request = build_inbound_nat_rules_get_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, subscription_id=self._config.subscription_id, + expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -48020,7 +48910,7 @@ def get( 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.http_response) + deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -48030,12 +48920,12 @@ def get( def _create_or_update_initial( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48046,22 +48936,22 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(tap_configuration_parameters, (IOBase, bytes)): - _content = tap_configuration_parameters + if isinstance(inbound_nat_rule_parameters, (IOBase, bytes)): + _content = inbound_nat_rule_parameters else: - _json = self._serialize.body(tap_configuration_parameters, "NetworkInterfaceTapConfiguration") + _json = self._serialize.body(inbound_nat_rule_parameters, "InboundNatRule") - _request = build_network_interface_tap_configurations_create_or_update_request( + _request = build_inbound_nat_rules_create_or_update_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - tap_configuration_name=tap_configuration_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, @@ -48099,31 +48989,30 @@ def _create_or_update_initial( def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: _models.NetworkInterfaceTapConfiguration, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: _models.InboundNatRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> LROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Required. - :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Required. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :return: An instance of LROPoller that returns either InboundNatRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -48131,31 +49020,30 @@ def begin_create_or_update( def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: IO[bytes], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> LROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Required. - :type tap_configuration_parameters: IO[bytes] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Required. + :type inbound_nat_rule_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :return: An instance of LROPoller that returns either InboundNatRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -48163,45 +49051,42 @@ def begin_create_or_update( def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - tap_configuration_name: str, - tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: Union[_models.InboundNatRule, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.NetworkInterfaceTapConfiguration]: - """Creates or updates a Tap configuration in the specified NetworkInterface. + ) -> LROPoller[_models.InboundNatRule]: + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :param tap_configuration_name: The name of the tap configuration. Required. - :type tap_configuration_name: str - :param tap_configuration_parameters: Parameters supplied to the create or update tap - configuration operation. Is either a NetworkInterfaceTapConfiguration type or a IO[bytes] type. - Required. - :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration - or IO[bytes] - :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. Required. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. Is either a InboundNatRule type or a IO[bytes] type. Required. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.models.InboundNatRule or IO[bytes] + :return: An instance of LROPoller that returns either InboundNatRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.InboundNatRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) 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, + 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, @@ -48213,7 +49098,7 @@ def begin_create_or_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceTapConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("InboundNatRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -48227,39 +49112,57 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.NetworkInterfaceTapConfiguration].from_continuation_token( + return LROPoller[_models.InboundNatRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.NetworkInterfaceTapConfiguration]( + return LROPoller[_models.InboundNatRule]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @distributed_trace - def list( - self, resource_group_name: str, network_interface_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkInterfaceTapConfiguration"]: - """Get all Tap configurations in a network interface. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. Required. - :type network_interface_name: str - :return: An iterator like instance of either NetworkInterfaceTapConfiguration or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] +class LoadBalancerLoadBalancingRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancer_load_balancing_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterable["_models.LoadBalancingRule"]: + """Gets all the load balancing rules in a load balancer. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either LoadBalancingRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancingRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkInterfaceTapConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerLoadBalancingRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48270,9 +49173,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_interface_tap_configurations_list_request( + _request = build_load_balancer_load_balancing_rules_list_request( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -48287,7 +49190,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfaceTapConfigurationListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerLoadBalancingRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -48310,39 +49213,23 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - -class NetworkManagersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_managers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any) -> _models.NetworkManager: - """Gets the specified Network Manager. + 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. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. Required. + :type load_balancing_rule_name: str + :return: LoadBalancingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.LoadBalancingRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48353,12 +49240,13 @@ def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancingRule] = kwargs.pop("cls", None) - _request = build_network_managers_get_request( + _request = build_load_balancer_load_balancing_rules_get_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_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, headers=_headers, @@ -48377,144 +49265,17 @@ def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: _models.NetworkManager, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManager - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.NetworkManager, IO[bytes]], - **kwargs: Any - ) -> _models.NetworkManager: - """Creates or updates a Network Manager. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Is either a - NetworkManager type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManager or IO[bytes] - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkManager") - - _request = build_network_managers_create_or_update_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **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) - - deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + deserialized = self._deserialize("LoadBalancingRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial( - self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any + def _health_initial( + self, group_name: str, load_balancer_name: str, load_balancing_rule_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48525,14 +49286,14 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_managers_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + _request = build_load_balancer_load_balancing_rules_health_request( + group_name=group_name, + load_balancer_name=load_balancer_name, + load_balancing_rule_name=load_balancing_rule_name, subscription_id=self._config.subscription_id, - force=force, api_version=api_version, headers=_headers, params=_params, @@ -48547,7 +49308,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -48567,36 +49328,35 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - def begin_delete( - self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a network manager. + def begin_health( + self, group_name: str, load_balancer_name: str, load_balancing_rule_name: str, **kwargs: Any + ) -> LROPoller[_models.LoadBalancerHealthPerRule]: + """Get health details of a load balancing rule. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :param group_name: The name of the resource group. Required. + :type group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. Required. + :type load_balancing_rule_name: str + :return: An instance of LROPoller that returns either LoadBalancerHealthPerRule or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.LoadBalancerHealthPerRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerHealthPerRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - force=force, + raw_result = self._health_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + load_balancing_rule_name=load_balancing_rule_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -48606,9 +49366,11 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("LoadBalancerHealthPerRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized if polling is True: polling_method: PollingMethod = cast( @@ -48619,88 +49381,124 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.LoadBalancerHealthPerRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return LROPoller[_models.LoadBalancerHealthPerRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - @overload - def patch( - self, - resource_group_name: str, - network_manager_name: str, - parameters: _models.PatchObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Patch NetworkManager. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: ~azure.mgmt.network.models.PatchObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager - :raises ~azure.core.exceptions.HttpResponseError: - """ +class LoadBalancerOutboundRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def patch( - self, - resource_group_name: str, - network_manager_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManager: - """Patch NetworkManager. + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancer_outbound_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterable["_models.OutboundRule"]: + """Gets all the outbound rules in a load balancer. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either OutboundRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.OutboundRule] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerOutboundRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) @distributed_trace - def patch( - self, - resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.PatchObject, IO[bytes]], - **kwargs: Any - ) -> _models.NetworkManager: - """Patch NetworkManager. + 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. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which network manager is. Is either a - PatchObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.PatchObject or IO[bytes] - :return: NetworkManager or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManager + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param outbound_rule_name: The name of the outbound rule. Required. + :type outbound_rule_name: str + :return: OutboundRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.OutboundRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48708,29 +49506,18 @@ def patch( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PatchObject") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.OutboundRule] = kwargs.pop("cls", None) - _request = build_network_managers_patch_request( + _request = build_load_balancer_outbound_rules_get_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + load_balancer_name=load_balancer_name, + outbound_rule_name=outbound_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -48747,38 +49534,54 @@ def patch( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + deserialized = self._deserialize("OutboundRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + +class LoadBalancerNetworkInterfacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancer_network_interfaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def list_by_subscription( - self, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.NetworkManager"]: - """List all network managers in a subscription. + def list( + self, resource_group_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterable["_models.NetworkInterface"]: + """Gets associated load balancer network interfaces. - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkManager or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManager] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either NetworkInterface or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterface] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48789,10 +49592,10 @@ def list_by_subscription( def prepare_request(next_link=None): if not next_link: - _request = build_network_managers_list_by_subscription_request( + _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, - top=top, - skip_token=skip_token, api_version=api_version, headers=_headers, params=_params, @@ -48806,7 +49609,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerListResult", pipeline_response) + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -48829,33 +49632,45 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + +class LoadBalancerProbesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`load_balancer_probes` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def list( - self, resource_group_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.NetworkManager"]: - """List network managers in a resource group. + def list(self, resource_group_name: str, load_balancer_name: str, **kwargs: Any) -> Iterable["_models.Probe"]: + """Gets all the load balancer probes. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkManager or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManager] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An iterator like instance of either Probe or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.Probe] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.LoadBalancerProbeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48866,11 +49681,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_network_managers_list_request( + _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, - top=top, - skip_token=skip_token, api_version=api_version, headers=_headers, params=_params, @@ -48884,7 +49698,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerListResult", pipeline_response) + deserialized = self._deserialize("LoadBalancerProbeListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -48907,15 +49721,72 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + @distributed_trace + def get(self, resource_group_name: str, load_balancer_name: str, probe_name: str, **kwargs: Any) -> _models.Probe: + """Gets load balancer probe. -class NetworkManagerCommitsOperations: + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param probe_name: The name of the probe. Required. + :type probe_name: str + :return: Probe or the result of cls(response) + :rtype: ~azure.mgmt.network.models.Probe + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.Probe] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class NatGatewaysOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_manager_commits` attribute. + :attr:`nat_gateways` attribute. """ models = _models @@ -48927,14 +49798,175 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _post_initial( + def _delete_initial(self, resource_group_name: str, nat_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_nat_gateways_delete_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(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. Required. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) + + _request = build_nat_gateways_get_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + expand=expand, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( self, resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.NetworkManagerCommit, IO[bytes]], + nat_gateway_name: str, + parameters: Union[_models.NatGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -48945,7 +49977,7 @@ def _post_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -48955,11 +49987,11 @@ def _post_initial( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "NetworkManagerCommit") + _json = self._serialize.body(parameters, "NatGateway") - _request = build_network_manager_commits_post_request( + _request = build_nat_gateways_create_or_update_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + nat_gateway_name=nat_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -48978,7 +50010,7 @@ def _post_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -48986,106 +50018,99 @@ def _post_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload - def begin_post( + def begin_create_or_update( self, resource_group_name: str, - network_manager_name: str, - parameters: _models.NetworkManagerCommit, + nat_gateway_name: str, + parameters: _models.NatGateway, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.NetworkManagerCommit]: - """Post a Network Manager Commit. + ) -> LROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network commit is. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerCommit + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Required. + :type parameters: ~azure.mgmt.network.models.NatGateway :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] + :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_post( + def begin_create_or_update( self, resource_group_name: str, - network_manager_name: str, + nat_gateway_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.NetworkManagerCommit]: - """Post a Network Manager Commit. + ) -> LROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network commit is. Required. + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] + :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_post( + def begin_create_or_update( self, resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.NetworkManagerCommit, IO[bytes]], + nat_gateway_name: str, + parameters: Union[_models.NatGateway, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.NetworkManagerCommit]: - """Post a Network Manager Commit. + ) -> LROPoller[_models.NatGateway]: + """Creates or updates a nat gateway. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network commit is. Is either a - NetworkManagerCommit type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerCommit or IO[bytes] - :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. Is either + a NatGateway type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NatGateway or IO[bytes] + :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerCommit] = kwargs.pop("cls", None) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._post_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + nat_gateway_name=nat_gateway_name, parameters=parameters, api_version=api_version, content_type=content_type, @@ -49098,140 +50123,104 @@ def begin_post( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkManagerCommit", pipeline_response.http_response) + deserialized = self._deserialize("NatGateway", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.NetworkManagerCommit].from_continuation_token( + return LROPoller[_models.NatGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.NetworkManagerCommit]( + return LROPoller[_models.NatGateway]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - -class NetworkManagerDeploymentStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_manager_deployment_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @overload - def list( + def update_tags( self, resource_group_name: str, - network_manager_name: str, - parameters: _models.NetworkManagerDeploymentStatusParameter, + nat_gateway_name: str, + parameters: _models.TagsObject, *, - top: Optional[int] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerDeploymentStatusListResult: - """Post to List of Network Manager Deployment Status. + ) -> _models.NatGateway: + """Updates nat gateway tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network deployment status is. - Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusParameter - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def list( + def update_tags( self, resource_group_name: str, - network_manager_name: str, + nat_gateway_name: str, parameters: IO[bytes], *, - top: Optional[int] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerDeploymentStatusListResult: - """Post to List of Network Manager Deployment Status. + ) -> _models.NatGateway: + """Updates nat gateway tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network deployment status is. - Required. + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Required. :type parameters: IO[bytes] - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def list( + def update_tags( self, resource_group_name: str, - network_manager_name: str, - parameters: Union[_models.NetworkManagerDeploymentStatusParameter, IO[bytes]], - *, - top: Optional[int] = None, + nat_gateway_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.NetworkManagerDeploymentStatusListResult: - """Post to List of Network Manager Deployment Status. + ) -> _models.NatGateway: + """Updates nat gateway tags. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param parameters: Parameters supplied to specify which Managed Network deployment status is. - Is either a NetworkManagerDeploymentStatusParameter type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusParameter or - IO[bytes] - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult + :param nat_gateway_name: The name of the nat gateway. Required. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. Is either a TagsObject type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: NatGateway or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NatGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49242,9 +50231,9 @@ def list( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerDeploymentStatusListResult] = kwargs.pop("cls", None) + cls: ClsType[_models.NatGateway] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -49252,13 +50241,12 @@ def list( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "NetworkManagerDeploymentStatusParameter") + _json = self._serialize.body(parameters, "TagsObject") - _request = build_network_manager_deployment_status_list_request( + _request = build_nat_gateways_update_tags_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, + nat_gateway_name=nat_gateway_name, subscription_id=self._config.subscription_id, - top=top, api_version=api_version, content_type=content_type, json=_json, @@ -49279,98 +50267,93 @@ def list( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerDeploymentStatusListResult", pipeline_response.http_response) + deserialized = self._deserialize("NatGateway", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @distributed_trace + def list_all(self, **kwargs: Any) -> Iterable["_models.NatGateway"]: + """Gets all the Nat Gateways in a subscription. -class SubscriptionNetworkManagerConnectionsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`subscription_network_manager_connections` attribute. - """ + :return: An iterator like instance of either NatGateway or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NatGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - models = _models + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - def create_or_update( - self, - network_manager_connection_name: str, - parameters: _models.NetworkManagerConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this subscription. + def prepare_request(next_link=None): + if not next_link: - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ + _request = build_nat_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - @overload - def create_or_update( - self, - network_manager_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this subscription. + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ + 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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) @distributed_trace - def create_or_update( - self, - network_manager_connection_name: str, - parameters: Union[_models.NetworkManagerConnection, IO[bytes]], - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this subscription. + def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NatGateway"]: + """Gets all nat gateways in a resource group. - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Is either a - NetworkManagerConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection or IO[bytes] - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :return: An iterator like instance of either NatGateway or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NatGateway] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NatGatewayListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49378,62 +50361,91 @@ def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) + _request = build_nat_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkManagerConnection") + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - _request = build_subscription_network_manager_connections_create_or_update_request( - network_manager_connection_name=network_manager_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + 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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def get_next(next_link=None): + _request = prepare_request(next_link) - response = pipeline_response.http_response + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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 not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) + return pipeline_response - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return ItemPaged(get_next, extract_data) - return deserialized # type: ignore + +class NetworkInterfaceIPConfigurationsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_interface_ip_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def get(self, network_manager_connection_name: str, **kwargs: Any) -> _models.NetworkManagerConnection: - """Get a specified connection created by this subscription. + def list( + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceIPConfiguration"]: + """Get all ip configurations in a network interface. - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either NetworkInterfaceIPConfiguration or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterfaceIPConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceIPConfigurationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49441,52 +50453,66 @@ def get(self, network_manager_connection_name: str, **kwargs: Any) -> _models.Ne } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - _request = build_subscription_network_manager_connections_get_request( - network_manager_connection_name=network_manager_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + 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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) - response = pipeline_response.http_response + def get_next(next_link=None): + _request = prepare_request(next_link) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) + if response.status_code not in [200]: + 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, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, network_manager_connection_name: str, **kwargs: Any - ) -> None: - """Delete specified connection created by this subscription. + 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 network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :return: None or the result of cls(response) - :rtype: None + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration name. Required. + :type ip_configuration_name: str + :return: NetworkInterfaceIPConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkInterfaceIPConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49497,11 +50523,13 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceIPConfiguration] = kwargs.pop("cls", None) - _request = build_subscription_network_manager_connections_delete_request( - network_manager_connection_name=network_manager_connection_name, + _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, headers=_headers, @@ -49516,39 +50544,58 @@ def delete( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [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.http_response) + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class NetworkInterfaceLoadBalancersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_interface_load_balancers` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.NetworkManagerConnection"]: - """List all network manager connections created by this subscription. + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> Iterable["_models.LoadBalancer"]: + """List all load balancers in a network interface. - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkManagerConnection or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerConnection] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceLoadBalancerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49559,10 +50606,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_subscription_network_manager_connections_list_request( + _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, - top=top, - skip_token=skip_token, api_version=api_version, headers=_headers, params=_params, @@ -49576,7 +50623,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerConnectionListResult", pipeline_response) + deserialized = self._deserialize("NetworkInterfaceLoadBalancerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -49600,14 +50647,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ManagementGroupNetworkManagerConnectionsOperations: # pylint: disable=name-too-long +class NetworkInterfaceTapConfigurationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`management_group_network_manager_connections` attribute. + :attr:`network_interface_tap_configurations` attribute. """ models = _models @@ -49619,83 +50666,10 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @overload - def create_or_update( - self, - management_group_id: str, - network_manager_connection_name: str, - parameters: _models.NetworkManagerConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this management group. - - :param management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - management_group_id: str, - network_manager_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this management group. - - :param management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - management_group_id: str, - network_manager_connection_name: str, - parameters: Union[_models.NetworkManagerConnection, IO[bytes]], - **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Create a network manager connection on this management group. - - :param management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :param parameters: Network manager connection to be created/updated. Is either a - NetworkManagerConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection or IO[bytes] - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _delete_initial( + self, resource_group_name: str, network_interface_name: str, tap_configuration_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49703,45 +50677,40 @@ def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkManagerConnection") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_management_group_network_manager_connections_create_or_update_request( - management_group_id=management_group_id, - network_manager_connection_name=network_manager_connection_name, + _request = build_network_interface_tap_configurations_delete_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, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -49749,77 +50718,132 @@ def create_or_update( return deserialized # type: ignore @distributed_trace - def get( - self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any - ) -> _models.NetworkManagerConnection: - """Get a specified connection created by this management group. + def begin_delete( + 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 management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :return: NetworkManagerConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerConnection + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :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: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) - - _request = build_management_group_network_manager_connections_get_request( - management_group_id=management_group_id, - network_manager_connection_name=network_manager_connection_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - response = pipeline_response.http_response + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :return: NetworkInterfaceTapConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) + deserialized = self._deserialize("NetworkInterfaceTapConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any - ) -> None: - """Delete specified pending connection created by this management group. - - :param management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :param network_manager_connection_name: Name for the network manager connection. Required. - :type network_manager_connection_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49827,64 +50851,223 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_management_group_network_manager_connections_delete_request( - management_group_id=management_group_id, - network_manager_connection_name=network_manager_connection_name, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(tap_configuration_parameters, (IOBase, bytes)): + _content = tap_configuration_parameters + else: + _json = self._serialize.body(tap_configuration_parameters, "NetworkInterfaceTapConfiguration") + + _request = build_network_interface_tap_configurations_create_or_update_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, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: _models.NetworkInterfaceTapConfiguration, + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Required. + :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Required. + :type tap_configuration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: Union[_models.NetworkInterfaceTapConfiguration, IO[bytes]], + **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. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. Required. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. Is either a NetworkInterfaceTapConfiguration type or a IO[bytes] type. + Required. + :type tap_configuration_parameters: ~azure.mgmt.network.models.NetworkInterfaceTapConfiguration + or IO[bytes] + :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterfaceTapConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceTapConfiguration", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkInterfaceTapConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkInterfaceTapConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def list( - self, management_group_id: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.NetworkManagerConnection"]: - """List all network manager connections created by this management group. + self, resource_group_name: str, network_interface_name: str, **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceTapConfiguration"]: + """Get all Tap configurations in a network interface. - :param management_group_id: The management group Id which uniquely identify the Microsoft Azure - management group. Required. - :type management_group_id: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkManagerConnection or the result of + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. Required. + :type network_interface_name: str + :return: An iterator like instance of either NetworkInterfaceTapConfiguration or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerConnection] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkInterfaceTapConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkInterfaceTapConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49895,10 +51078,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_management_group_network_manager_connections_list_request( - management_group_id=management_group_id, - top=top, - skip_token=skip_token, + _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, headers=_headers, params=_params, @@ -49912,7 +51095,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerConnectionListResult", pipeline_response) + deserialized = self._deserialize("NetworkInterfaceTapConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -49936,14 +51119,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ConnectivityConfigurationsOperations: +class NetworkManagersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`connectivity_configurations` attribute. + :attr:`network_managers` attribute. """ models = _models @@ -49956,24 +51139,18 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def get( - self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.ConnectivityConfiguration: - """Gets a Network Connectivity Configuration, specified by the resource group, network manager - name, and connectivity Configuration name. + def get(self, resource_group_name: str, network_manager_name: str, **kwargs: Any) -> _models.NetworkManager: + """Gets the specified Network Manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager connectivity configuration. - Required. - :type configuration_name: str - :return: ConnectivityConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -49984,13 +51161,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) - _request = build_connectivity_configurations_get_request( + _request = build_network_managers_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -50009,7 +51185,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ConnectivityConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -50021,29 +51197,24 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - connectivity_configuration: _models.ConnectivityConfiguration, + parameters: _models.NetworkManager, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ConnectivityConfiguration: - """Creates/Updates a new network manager connectivity configuration. + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager connectivity configuration. - Required. - :type configuration_name: str - :param connectivity_configuration: Parameters supplied to create/update a network manager - connectivity configuration. Required. - :type connectivity_configuration: ~azure.mgmt.network.models.ConnectivityConfiguration + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManager :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ConnectivityConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ @@ -50052,29 +51223,24 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - connectivity_configuration: IO[bytes], + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ConnectivityConfiguration: - """Creates/Updates a new network manager connectivity configuration. + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager connectivity configuration. - Required. - :type configuration_name: str - :param connectivity_configuration: Parameters supplied to create/update a network manager - connectivity configuration. Required. - :type connectivity_configuration: IO[bytes] + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ConnectivityConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ @@ -50083,29 +51249,23 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - connectivity_configuration: Union[_models.ConnectivityConfiguration, IO[bytes]], + parameters: Union[_models.NetworkManager, IO[bytes]], **kwargs: Any - ) -> _models.ConnectivityConfiguration: - """Creates/Updates a new network manager connectivity configuration. + ) -> _models.NetworkManager: + """Creates or updates a Network Manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager connectivity configuration. - Required. - :type configuration_name: str - :param connectivity_configuration: Parameters supplied to create/update a network manager - connectivity configuration. Is either a ConnectivityConfiguration type or a IO[bytes] type. - Required. - :type connectivity_configuration: ~azure.mgmt.network.models.ConnectivityConfiguration or - IO[bytes] - :return: ConnectivityConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration + :param parameters: Parameters supplied to specify which network manager is. Is either a + NetworkManager type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManager or IO[bytes] + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50116,22 +51276,21 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(connectivity_configuration, (IOBase, bytes)): - _content = connectivity_configuration + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(connectivity_configuration, "ConnectivityConfiguration") + _json = self._serialize.body(parameters, "NetworkManager") - _request = build_connectivity_configurations_create_or_update_request( + _request = build_network_managers_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -50153,7 +51312,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ConnectivityConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -50161,15 +51320,9 @@ def create_or_update( return deserialized # type: ignore def _delete_initial( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50180,13 +51333,12 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_connectivity_configurations_delete_request( + _request = build_network_managers_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -50224,24 +51376,14 @@ def _delete_initial( @distributed_trace def begin_delete( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, network_manager_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a network manager connectivity configuration, specified by the resource group, network - manager name, and connectivity configuration name. + """Deletes a network manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager connectivity configuration. - Required. - :type configuration_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -50253,7 +51395,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -50262,7 +51404,6 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -50294,42 +51435,80 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - def list( + @overload + def patch( self, resource_group_name: str, network_manager_name: str, + parameters: _models.PatchObject, *, - top: Optional[int] = None, - skip_token: Optional[str] = None, + content_type: str = "application/json", **kwargs: Any - ) -> Iterable["_models.ConnectivityConfiguration"]: - """Lists all the network manager connectivity configuration in a specified network manager. + ) -> _models.NetworkManager: + """Patch NetworkManager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either ConnectivityConfiguration or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ConnectivityConfiguration] + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: ~azure.mgmt.network.models.PatchObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ConnectivityConfigurationListResult] = kwargs.pop("cls", None) + @overload + def patch( + self, + resource_group_name: str, + network_manager_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkManager: + """Patch NetworkManager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def patch( + self, + resource_group_name: str, + network_manager_name: str, + parameters: Union[_models.PatchObject, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkManager: + """Patch NetworkManager. - error_map: MutableMapping[int, Type[HttpResponseError]] = { + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. Is either a + PatchObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.PatchObject or IO[bytes] + :return: NetworkManager or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManager + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50337,12 +51516,166 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _request = build_connectivity_configurations_list_request( + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkManager] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PatchObject") + + _request = build_network_managers_patch_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkManager", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_subscription( + self, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any + ) -> Iterable["_models.NetworkManager"]: + """List all network managers in a subscription. + + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either NetworkManager or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManager] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_managers_list_by_subscription_request( + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkManagerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @distributed_trace + def list( + self, resource_group_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any + ) -> Iterable["_models.NetworkManager"]: + """List network managers in a resource group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either NetworkManager or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManager] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_managers_list_request( resource_group_name=resource_group_name, - network_manager_name=network_manager_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -50359,7 +51692,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("ConnectivityConfigurationListResult", pipeline_response) + deserialized = self._deserialize("NetworkManagerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -50383,14 +51716,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class NetworkGroupsOperations: +class NetworkManagerCommitsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_groups` attribute. + :attr:`network_manager_commits` attribute. """ models = _models @@ -50402,23 +51735,14 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def get( - self, resource_group_name: str, network_manager_name: str, network_group_name: str, **kwargs: Any - ) -> _models.NetworkGroup: - """Gets the specified network group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :return: NetworkGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _post_initial( + self, + resource_group_name: str, + network_manager_name: str, + parameters: Union[_models.NetworkManagerCommit, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50426,303 +51750,153 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_groups_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "NetworkManagerCommit") + + _request = build_network_manager_commits_post_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - network_group_name=network_group_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkGroup", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def create_or_update( + def begin_post( self, resource_group_name: str, network_manager_name: str, - network_group_name: str, - parameters: _models.NetworkGroup, + parameters: _models.NetworkManagerCommit, *, - if_match: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkGroup: - """Creates or updates a network group. + ) -> LROPoller[_models.NetworkManagerCommit]: + """Post a Network Manager Commit. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param parameters: Parameters supplied to the specify which network group need to create. - Required. - :type parameters: ~azure.mgmt.network.models.NetworkGroup - :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the - current resource. Specify the last-seen ETag value to prevent accidentally overwriting - concurrent changes. Default value is None. - :paramtype if_match: str + :param parameters: Parameters supplied to specify which Managed Network commit is. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerCommit :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkGroup + :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def begin_post( self, resource_group_name: str, network_manager_name: str, - network_group_name: str, parameters: IO[bytes], *, - if_match: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkGroup: - """Creates or updates a network group. + ) -> LROPoller[_models.NetworkManagerCommit]: + """Post a Network Manager Commit. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param parameters: Parameters supplied to the specify which network group need to create. - Required. + :param parameters: Parameters supplied to specify which Managed Network commit is. Required. :type parameters: IO[bytes] - :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the - current resource. Specify the last-seen ETag value to prevent accidentally overwriting - concurrent changes. Default value is None. - :paramtype if_match: str :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkGroup + :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_or_update( + def begin_post( self, resource_group_name: str, network_manager_name: str, - network_group_name: str, - parameters: Union[_models.NetworkGroup, IO[bytes]], - *, - if_match: Optional[str] = None, + parameters: Union[_models.NetworkManagerCommit, IO[bytes]], **kwargs: Any - ) -> _models.NetworkGroup: - """Creates or updates a network group. + ) -> LROPoller[_models.NetworkManagerCommit]: + """Post a Network Manager Commit. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param parameters: Parameters supplied to the specify which network group need to create. Is - either a NetworkGroup type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkGroup or IO[bytes] - :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the - current resource. Specify the last-seen ETag value to prevent accidentally overwriting - concurrent changes. Default value is None. - :paramtype if_match: str - :return: NetworkGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkGroup + :param parameters: Parameters supplied to specify which Managed Network commit is. Is either a + NetworkManagerCommit type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerCommit or IO[bytes] + :return: An instance of LROPoller that returns either NetworkManagerCommit or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkManagerCommit] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkGroup") - - _request = build_network_groups_create_or_update_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **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) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NetworkGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_network_groups_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, - subscription_id=self._config.subscription_id, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes a network group. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :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: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManagerCommit] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._post_initial( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - network_group_name=network_group_name, - force=force, + parameters=parameters, api_version=api_version, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -50731,9 +51905,11 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("NetworkManagerCommit", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized if polling is True: polling_method: PollingMethod = cast( @@ -50744,145 +51920,126 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.NetworkManagerCommit].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return LROPoller[_models.NetworkManagerCommit]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - @distributed_trace + +class NetworkManagerDeploymentStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_manager_deployment_status` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload def list( self, resource_group_name: str, network_manager_name: str, + parameters: _models.NetworkManagerDeploymentStatusParameter, *, top: Optional[int] = None, - skip_token: Optional[str] = None, + content_type: str = "application/json", **kwargs: Any - ) -> Iterable["_models.NetworkGroup"]: - """Lists the specified network group. + ) -> _models.NetworkManagerDeploymentStatusListResult: + """Post to List of Network Manager Deployment Status. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusParameter :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkGroup] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_network_groups_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - top=top, - skip_token=skip_token, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkGroupListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class StaticMembersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`static_members` attribute. - """ - - models = _models + @overload + def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: IO[bytes], + *, + top: Optional[int] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkManagerDeploymentStatusListResult: + """Post to List of Network Manager Deployment Status. - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + Required. + :type parameters: IO[bytes] + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def get( + def list( self, resource_group_name: str, network_manager_name: str, - network_group_name: str, - static_member_name: str, + parameters: Union[_models.NetworkManagerDeploymentStatusParameter, IO[bytes]], + *, + top: Optional[int] = None, **kwargs: Any - ) -> _models.StaticMember: - """Gets the specified static member. + ) -> _models.NetworkManagerDeploymentStatusListResult: + """Post to List of Network Manager Deployment Status. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param static_member_name: The name of the static member. Required. - :type static_member_name: str - :return: StaticMember or the result of cls(response) - :rtype: ~azure.mgmt.network.models.StaticMember + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + Is either a NetworkManagerDeploymentStatusParameter type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusParameter or + IO[bytes] + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :return: NetworkManagerDeploymentStatusListResult or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerDeploymentStatusListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -50890,19 +52047,30 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkManagerDeploymentStatusListResult] = kwargs.pop("cls", None) - _request = build_static_members_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "NetworkManagerDeploymentStatusParameter") + + _request = build_network_manager_deployment_status_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - network_group_name=network_group_name, - static_member_name=static_member_name, subscription_id=self._config.subscription_id, + top=top, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -50919,105 +52087,98 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("StaticMember", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerDeploymentStatusListResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + +class SubscriptionNetworkManagerConnectionsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`subscription_network_manager_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @overload def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - static_member_name: str, - parameters: _models.StaticMember, + network_manager_connection_name: str, + parameters: _models.NetworkManagerConnection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.StaticMember: - """Creates or updates a static member. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param static_member_name: The name of the static member. Required. - :type static_member_name: str - :param parameters: Parameters supplied to the specify the static member to create. Required. - :type parameters: ~azure.mgmt.network.models.StaticMember + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: StaticMember or the result of cls(response) - :rtype: ~azure.mgmt.network.models.StaticMember + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - static_member_name: str, + network_manager_connection_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.StaticMember: - """Creates or updates a static member. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param static_member_name: The name of the static member. Required. - :type static_member_name: str - :param parameters: Parameters supplied to the specify the static member to create. Required. + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: StaticMember or the result of cls(response) - :rtype: ~azure.mgmt.network.models.StaticMember + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - static_member_name: str, - parameters: Union[_models.StaticMember, IO[bytes]], + network_manager_connection_name: str, + parameters: Union[_models.NetworkManagerConnection, IO[bytes]], **kwargs: Any - ) -> _models.StaticMember: - """Creates or updates a static member. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param static_member_name: The name of the static member. Required. - :type static_member_name: str - :param parameters: Parameters supplied to the specify the static member to create. Is either a - StaticMember type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.StaticMember or IO[bytes] - :return: StaticMember or the result of cls(response) - :rtype: ~azure.mgmt.network.models.StaticMember + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Is either a + NetworkManagerConnection type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection or IO[bytes] + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51028,9 +52189,9 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -51038,13 +52199,10 @@ def create_or_update( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "StaticMember") + _json = self._serialize.body(parameters, "NetworkManagerConnection") - _request = build_static_members_create_or_update_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, - static_member_name=static_member_name, + _request = build_subscription_network_manager_connections_create_or_update_request( + network_manager_connection_name=network_manager_connection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -51066,7 +52224,58 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("StaticMember", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get(self, network_manager_connection_name: str, **kwargs: Any) -> _models.NetworkManagerConnection: + """Get a specified connection created by this subscription. + + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) + + _request = build_subscription_network_manager_connections_get_request( + network_manager_connection_name=network_manager_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -51075,28 +52284,17 @@ def create_or_update( @distributed_trace def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - static_member_name: str, - **kwargs: Any + self, network_manager_connection_name: str, **kwargs: Any ) -> None: - """Deletes a static member. + """Delete specified connection created by this subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str - :param static_member_name: The name of the static member. Required. - :type static_member_name: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51107,14 +52305,11 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_static_members_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, - static_member_name=static_member_name, + _request = build_subscription_network_manager_connections_delete_request( + network_manager_connection_name=network_manager_connection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -51138,23 +52333,10 @@ def delete( # pylint: disable=inconsistent-return-statements @distributed_trace def list( - self, - resource_group_name: str, - network_manager_name: str, - network_group_name: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.StaticMember"]: - """Lists the specified static member. + self, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any + ) -> Iterable["_models.NetworkManagerConnection"]: + """List all network manager connections created by this subscription. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param network_group_name: The name of the network group. Required. - :type network_group_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -51163,17 +52345,18 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either StaticMember or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.StaticMember] + :return: An iterator like instance of either NetworkManagerConnection or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.StaticMemberListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51184,10 +52367,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_static_members_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - network_group_name=network_group_name, + _request = build_subscription_network_manager_connections_list_request( subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -51204,7 +52384,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("StaticMemberListResult", pipeline_response) + deserialized = self._deserialize("NetworkManagerConnectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -51228,14 +52408,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ScopeConnectionsOperations: +class ManagementGroupNetworkManagerConnectionsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`scope_connections` attribute. + :attr:`management_group_network_manager_connections` attribute. """ models = _models @@ -51250,86 +52430,80 @@ def __init__(self, *args, **kwargs): @overload def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - scope_connection_name: str, - parameters: _models.ScopeConnection, + management_group_id: str, + network_manager_connection_name: str, + parameters: _models.NetworkManagerConnection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Required. - :type parameters: ~azure.mgmt.network.models.ScopeConnection + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - scope_connection_name: str, + management_group_id: str, + network_manager_connection_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Required. + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def create_or_update( self, - resource_group_name: str, - network_manager_name: str, - scope_connection_name: str, - parameters: Union[_models.ScopeConnection, IO[bytes]], + management_group_id: str, + network_manager_connection_name: str, + parameters: Union[_models.NetworkManagerConnection, IO[bytes]], **kwargs: Any - ) -> _models.ScopeConnection: - """Creates or updates scope connection from Network Manager. + ) -> _models.NetworkManagerConnection: + """Create a network manager connection on this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :param parameters: Scope connection to be created/updated. Is either a ScopeConnection type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.ScopeConnection or IO[bytes] - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :param parameters: Network manager connection to be created/updated. Is either a + NetworkManagerConnection type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkManagerConnection or IO[bytes] + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51340,9 +52514,9 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -51350,13 +52524,11 @@ def create_or_update( if isinstance(parameters, (IOBase, bytes)): _content = parameters else: - _json = self._serialize.body(parameters, "ScopeConnection") + _json = self._serialize.body(parameters, "NetworkManagerConnection") - _request = build_scope_connections_create_or_update_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, - subscription_id=self._config.subscription_id, + _request = build_management_group_network_manager_connections_create_or_update_request( + management_group_id=management_group_id, + network_manager_connection_name=network_manager_connection_name, api_version=api_version, content_type=content_type, json=_json, @@ -51377,7 +52549,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -51386,21 +52558,20 @@ def create_or_update( @distributed_trace def get( - self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any - ) -> _models.ScopeConnection: - """Get specified scope connection created by this Network Manager. + self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any + ) -> _models.NetworkManagerConnection: + """Get a specified connection created by this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str - :return: ScopeConnection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.ScopeConnection + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str + :return: NetworkManagerConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51411,14 +52582,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerConnection] = kwargs.pop("cls", None) - _request = build_scope_connections_get_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, - subscription_id=self._config.subscription_id, + _request = build_management_group_network_manager_connections_get_request( + management_group_id=management_group_id, + network_manager_connection_name=network_manager_connection_name, api_version=api_version, headers=_headers, params=_params, @@ -51436,7 +52605,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerConnection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -51445,21 +52614,20 @@ def get( @distributed_trace def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any + self, management_group_id: str, network_manager_connection_name: str, **kwargs: Any ) -> None: - """Delete the pending scope connection created by this network manager. + """Delete specified pending connection created by this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param scope_connection_name: Name for the cross-tenant connection. Required. - :type scope_connection_name: str + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str + :param network_manager_connection_name: Name for the network manager connection. Required. + :type network_manager_connection_name: str :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51470,14 +52638,12 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_scope_connections_delete_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - scope_connection_name=scope_connection_name, - subscription_id=self._config.subscription_id, + _request = build_management_group_network_manager_connections_delete_request( + management_group_id=management_group_id, + network_manager_connection_name=network_manager_connection_name, api_version=api_version, headers=_headers, params=_params, @@ -51500,20 +52666,13 @@ def delete( # pylint: disable=inconsistent-return-statements @distributed_trace def list( - self, - resource_group_name: str, - network_manager_name: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.ScopeConnection"]: - """List all scope connections created by this network manager. + self, management_group_id: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any + ) -> Iterable["_models.NetworkManagerConnection"]: + """List all network manager connections created by this management group. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str + :param management_group_id: The management group Id which uniquely identify the Microsoft Azure + management group. Required. + :type management_group_id: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -51522,17 +52681,18 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either ScopeConnection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ScopeConnection] + :return: An iterator like instance of either NetworkManagerConnection or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.ScopeConnectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51543,10 +52703,8 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_scope_connections_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, + _request = build_management_group_network_manager_connections_list_request( + management_group_id=management_group_id, top=top, skip_token=skip_token, api_version=api_version, @@ -51562,7 +52720,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("ScopeConnectionListResult", pipeline_response) + deserialized = self._deserialize("NetworkManagerConnectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -51586,14 +52744,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class SecurityAdminConfigurationsOperations: +class ConnectivityConfigurationsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`security_admin_configurations` attribute. + :attr:`connectivity_configurations` attribute. """ models = _models @@ -51605,112 +52763,25 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list( - self, - resource_group_name: str, - network_manager_name: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.SecurityAdminConfiguration"]: - """Lists all the network manager security admin configurations in a network manager, in a - paginated format. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either SecurityAdminConfiguration or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityAdminConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityAdminConfigurationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_security_admin_configurations_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - top=top, - skip_token=skip_token, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityAdminConfigurationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - @distributed_trace def get( self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Retrieves a network manager security admin configuration. + ) -> _models.ConnectivityConfiguration: + """Gets a Network Connectivity Configuration, specified by the resource group, network manager + name, and connectivity Configuration name. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager connectivity configuration. + Required. :type configuration_name: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: ConnectivityConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51721,10 +52792,10 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) - _request = build_security_admin_configurations_get_request( + _request = build_connectivity_configurations_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -51746,7 +52817,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("ConnectivityConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -51759,27 +52830,28 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: _models.SecurityAdminConfiguration, + connectivity_configuration: _models.ConnectivityConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.ConnectivityConfiguration: + """Creates/Updates a new network manager connectivity configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. + :param configuration_name: The name of the network manager connectivity configuration. Required. - :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. Required. + :type connectivity_configuration: ~azure.mgmt.network.models.ConnectivityConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: ConnectivityConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -51789,27 +52861,28 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: IO[bytes], + connectivity_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.ConnectivityConfiguration: + """Creates/Updates a new network manager connectivity configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. + :param configuration_name: The name of the network manager connectivity configuration. Required. - :type security_admin_configuration: IO[bytes] + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. Required. + :type connectivity_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: ConnectivityConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -51819,26 +52892,28 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_admin_configuration: Union[_models.SecurityAdminConfiguration, IO[bytes]], + connectivity_configuration: Union[_models.ConnectivityConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.SecurityAdminConfiguration: - """Creates or updates a network manager security admin configuration. + ) -> _models.ConnectivityConfiguration: + """Creates/Updates a new network manager connectivity configuration. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager connectivity configuration. + Required. :type configuration_name: str - :param security_admin_configuration: The security admin configuration to create or update. Is - either a SecurityAdminConfiguration type or a IO[bytes] type. Required. - :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration or + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. Is either a ConnectivityConfiguration type or a IO[bytes] type. + Required. + :type connectivity_configuration: ~azure.mgmt.network.models.ConnectivityConfiguration or IO[bytes] - :return: SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration + :return: ConnectivityConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ConnectivityConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51849,19 +52924,19 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.ConnectivityConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_admin_configuration, (IOBase, bytes)): - _content = security_admin_configuration + if isinstance(connectivity_configuration, (IOBase, bytes)): + _content = connectivity_configuration else: - _json = self._serialize.body(security_admin_configuration, "SecurityAdminConfiguration") + _json = self._serialize.body(connectivity_configuration, "ConnectivityConfiguration") - _request = build_security_admin_configurations_create_or_update_request( + _request = build_connectivity_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -51886,7 +52961,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("ConnectivityConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -51902,7 +52977,7 @@ def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -51913,10 +52988,10 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_admin_configurations_delete_request( + _request = build_connectivity_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -51965,13 +53040,15 @@ def begin_delete( force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a network manager security admin configuration. + """Deletes a network manager connectivity configuration, specified by the resource group, network + manager name, and connectivity configuration name. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager connectivity configuration. + Required. :type configuration_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, @@ -51984,7 +53061,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -52025,45 +53102,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - -class AdminRuleCollectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`admin_rule_collections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.AdminRuleCollection"]: - """Lists all the rule collections in a security admin configuration, in a paginated format. + ) -> Iterable["_models.ConnectivityConfiguration"]: + """Lists all the network manager connectivity configuration in a specified network manager. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -52072,17 +53126,18 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either AdminRuleCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.AdminRuleCollection] + :return: An iterator like instance of either ConnectivityConfiguration or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ConnectivityConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ConnectivityConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52093,10 +53148,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_admin_rule_collections_list_request( + _request = build_connectivity_configurations_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -52113,7 +53167,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("AdminRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("ConnectivityConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -52136,31 +53190,43 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + +class NetworkGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_groups` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace def get( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - **kwargs: Any - ) -> _models.AdminRuleCollection: - """Gets a network manager security admin configuration rule collection. + self, resource_group_name: str, network_manager_name: str, network_group_name: str, **kwargs: Any + ) -> _models.NetworkGroup: + """Gets the specified network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :return: NetworkGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52171,14 +53237,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) - _request = build_admin_rule_collections_get_request( + _request = build_network_groups_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, + network_group_name=network_group_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -52197,7 +53262,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("NetworkGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -52209,31 +53274,33 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_collection: _models.AdminRuleCollection, + network_group_name: str, + parameters: _models.NetworkGroup, *, + if_match: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.NetworkGroup: + """Creates or updates a network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + Required. + :type parameters: ~azure.mgmt.network.models.NetworkGroup + :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. Default value is None. + :paramtype if_match: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :return: NetworkGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ @@ -52242,31 +53309,33 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_collection: IO[bytes], + network_group_name: str, + parameters: IO[bytes], *, + if_match: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.NetworkGroup: + """Creates or updates a network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: IO[bytes] + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + Required. + :type parameters: IO[bytes] + :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. Default value is None. + :paramtype if_match: str :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :return: NetworkGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ @@ -52275,30 +53344,32 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_collection: Union[_models.AdminRuleCollection, IO[bytes]], + network_group_name: str, + parameters: Union[_models.NetworkGroup, IO[bytes]], + *, + if_match: Optional[str] = None, **kwargs: Any - ) -> _models.AdminRuleCollection: - """Creates or updates an admin rule collection. + ) -> _models.NetworkGroup: + """Creates or updates a network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Is either a - AdminRuleCollection type or a IO[bytes] type. Required. - :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection or IO[bytes] - :return: AdminRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.AdminRuleCollection + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. Is + either a NetworkGroup type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkGroup or IO[bytes] + :keyword if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. Default value is None. + :paramtype if_match: str + :return: NetworkGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52309,24 +53380,24 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkGroup] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(rule_collection, (IOBase, bytes)): - _content = rule_collection + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(rule_collection, "AdminRuleCollection") + _json = self._serialize.body(parameters, "NetworkGroup") - _request = build_admin_rule_collections_create_or_update_request( + _request = build_network_groups_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, + network_group_name=network_group_name, subscription_id=self._config.subscription_id, + if_match=if_match, api_version=api_version, content_type=content_type, json=_json, @@ -52347,10 +53418,13 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("NetworkGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @@ -52358,13 +53432,12 @@ def _delete_initial( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, + network_group_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52375,14 +53448,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_admin_rule_collections_delete_request( + _request = build_network_groups_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, + network_group_name=network_group_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -52423,23 +53495,19 @@ def begin_delete( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, + network_group_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes an admin rule collection. + """Deletes a network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str + :param network_group_name: The name of the network group. Required. + :type network_group_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -52451,7 +53519,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -52460,8 +53528,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, + network_group_name=network_group_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -52493,49 +53560,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - -class AdminRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`admin_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.BaseAdminRule"]: - """List all network manager security configuration admin rules. + ) -> Iterable["_models.NetworkGroup"]: + """Lists the specified network group. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -52544,17 +53584,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either BaseAdminRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.BaseAdminRule] + :return: An iterator like instance of either NetworkGroup or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.AdminRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52565,11 +53605,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_admin_rules_list_request( + _request = build_network_groups_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -52586,7 +53624,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("AdminRuleListResult", pipeline_response) + deserialized = self._deserialize("NetworkGroupListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -52609,34 +53647,50 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + +class StaticMembersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`static_members` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace def get( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, + network_group_name: str, + static_member_name: str, **kwargs: Any - ) -> _models.BaseAdminRule: - """Gets a network manager security configuration admin rule. + ) -> _models.StaticMember: + """Gets the specified static member. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param static_member_name: The name of the static member. Required. + :type static_member_name: str + :return: StaticMember or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52647,15 +53701,14 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) - _request = build_admin_rules_get_request( + _request = build_static_members_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_group_name=network_group_name, + static_member_name=static_member_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -52674,7 +53727,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) + deserialized = self._deserialize("StaticMember", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -52686,34 +53739,30 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: _models.BaseAdminRule, + network_group_name: str, + static_member_name: str, + parameters: _models.StaticMember, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.StaticMember: + """Creates or updates a static member. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Required. - :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param static_member_name: The name of the static member. Required. + :type static_member_name: str + :param parameters: Parameters supplied to the specify the static member to create. Required. + :type parameters: ~azure.mgmt.network.models.StaticMember :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :return: StaticMember or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ @@ -52722,34 +53771,30 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: IO[bytes], + network_group_name: str, + static_member_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.StaticMember: + """Creates or updates a static member. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Required. - :type admin_rule: IO[bytes] + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param static_member_name: The name of the static member. Required. + :type static_member_name: str + :param parameters: Parameters supplied to the specify the static member to create. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :return: StaticMember or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ @@ -52758,33 +53803,29 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - admin_rule: Union[_models.BaseAdminRule, IO[bytes]], + network_group_name: str, + static_member_name: str, + parameters: Union[_models.StaticMember, IO[bytes]], **kwargs: Any - ) -> _models.BaseAdminRule: - """Creates or updates an admin rule. + ) -> _models.StaticMember: + """Creates or updates a static member. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param admin_rule: The admin rule to create or update. Is either a BaseAdminRule type or a - IO[bytes] type. Required. - :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule or IO[bytes] - :return: BaseAdminRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.BaseAdminRule + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param static_member_name: The name of the static member. Required. + :type static_member_name: str + :param parameters: Parameters supplied to the specify the static member to create. Is either a + StaticMember type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.StaticMember or IO[bytes] + :return: StaticMember or the result of cls(response) + :rtype: ~azure.mgmt.network.models.StaticMember :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52795,24 +53836,23 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) + cls: ClsType[_models.StaticMember] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(admin_rule, (IOBase, bytes)): - _content = admin_rule + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(admin_rule, "BaseAdminRule") + _json = self._serialize.body(parameters, "StaticMember") - _request = build_admin_rules_create_or_update_request( + _request = build_static_members_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_group_name=network_group_name, + static_member_name=static_member_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -52834,25 +53874,37 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) + deserialized = self._deserialize("StaticMember", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial( + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, - *, - force: Optional[bool] = None, + network_group_name: str, + static_member_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> None: + """Deletes a static member. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :param static_member_name: The name of the static member. Required. + :type static_member_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -52863,138 +53915,135 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_admin_rules_delete_request( + _request = build_static_members_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, + network_group_name=network_group_name, + static_member_name=static_member_name, subscription_id=self._config.subscription_id, - force=force, api_version=api_version, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - def begin_delete( + def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - rule_name: str, + network_group_name: str, *, - force: Optional[bool] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an admin rule. + ) -> Iterable["_models.StaticMember"]: + """Lists the specified static member. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. - :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :param network_group_name: The name of the network group. Required. + :type network_group_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either StaticMember or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.StaticMember] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - rule_collection_name=rule_collection_name, - rule_name=rule_name, - force=force, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.StaticMemberListResult] = kwargs.pop("cls", None) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_static_members_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + network_group_name=network_group_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("StaticMemberListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) -class SecurityUserConfigurationsOperations: + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkManagerRoutingConfigurationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`security_user_configurations` attribute. + :attr:`network_manager_routing_configurations` attribute. """ models = _models @@ -53015,8 +54064,8 @@ def list( top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.SecurityUserConfiguration"]: - """Lists all the network manager security user configurations in a network manager, in a paginated + ) -> Iterable["_models.NetworkManagerRoutingConfiguration"]: + """Lists all the network manager routing configurations in a network manager, in a paginated format. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -53032,18 +54081,19 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserConfiguration or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserConfiguration] + :return: An iterator like instance of either NetworkManagerRoutingConfiguration or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerRoutingConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserConfigurationListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerRoutingConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53054,7 +54104,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_configurations_list_request( + _request = build_network_manager_routing_configurations_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, subscription_id=self._config.subscription_id, @@ -53073,7 +54123,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserConfigurationListResult", pipeline_response) + deserialized = self._deserialize("NetworkManagerRoutingConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -53099,21 +54149,21 @@ def get_next(next_link=None): @distributed_trace def get( self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Retrieves a network manager security user configuration. + ) -> _models.NetworkManagerRoutingConfiguration: + """Retrieves a network manager routing configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53124,10 +54174,10 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) - _request = build_security_user_configurations_get_request( + _request = build_network_manager_routing_configurations_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53149,7 +54199,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -53162,28 +54212,27 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: _models.SecurityUserConfiguration, + routing_configuration: _models.NetworkManagerRoutingConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. - Required. - :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration + :param routing_configuration: The routing configuration to create or update. Required. + :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -53193,28 +54242,27 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: IO[bytes], + routing_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. - Required. - :type security_user_configuration: IO[bytes] + :param routing_configuration: The routing configuration to create or update. Required. + :type routing_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -53224,27 +54272,27 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - security_user_configuration: Union[_models.SecurityUserConfiguration, IO[bytes]], + routing_configuration: Union[_models.NetworkManagerRoutingConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserConfiguration: - """Creates or updates a network manager security user configuration. + ) -> _models.NetworkManagerRoutingConfiguration: + """Creates or updates a network manager routing configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param security_user_configuration: The security user configuration to create or update. Is - either a SecurityUserConfiguration type or a IO[bytes] type. Required. - :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration or + :param routing_configuration: The routing configuration to create or update. Is either a + NetworkManagerRoutingConfiguration type or a IO[bytes] type. Required. + :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration or IO[bytes] - :return: SecurityUserConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :return: NetworkManagerRoutingConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53255,19 +54303,19 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_configuration, (IOBase, bytes)): - _content = security_user_configuration + if isinstance(routing_configuration, (IOBase, bytes)): + _content = routing_configuration else: - _json = self._serialize.body(security_user_configuration, "SecurityUserConfiguration") + _json = self._serialize.body(routing_configuration, "NetworkManagerRoutingConfiguration") - _request = build_security_user_configurations_create_or_update_request( + _request = build_network_manager_routing_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53292,7 +54340,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -53308,7 +54356,7 @@ def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53319,10 +54367,10 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_configurations_delete_request( + _request = build_network_manager_routing_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53371,14 +54419,14 @@ def begin_delete( force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a network manager security user configuration. + """Deletes a network manager routing configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, @@ -53391,7 +54439,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -53433,14 +54481,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityUserRuleCollectionsOperations: +class RoutingRuleCollectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`security_user_rule_collections` attribute. + :attr:`routing_rule_collections` attribute. """ models = _models @@ -53462,16 +54510,15 @@ def list( top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.SecurityUserRuleCollection"]: - """Lists all the security user rule collections in a security configuration, in a paginated - format. + ) -> Iterable["_models.RoutingRuleCollection"]: + """Lists all the rule collections in a routing configuration, in a paginated format. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. @@ -53481,18 +54528,18 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserRuleCollection or the result of + :return: An iterator like instance of either RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserRuleCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.RoutingRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53503,7 +54550,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_rule_collections_list_request( + _request = build_routing_rule_collections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53523,7 +54570,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("RoutingRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -53554,24 +54601,24 @@ def get( configuration_name: str, rule_collection_name: str, **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Gets a network manager security user configuration rule collection. + ) -> _models.RoutingRuleCollection: + """Gets a network manager routing configuration rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53582,10 +54629,10 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) - _request = build_security_user_rule_collections_get_request( + _request = build_routing_rule_collections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53608,7 +54655,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -53622,31 +54669,30 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: _models.SecurityUserRuleCollection, + rule_collection: _models.RoutingRuleCollection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. - Required. - :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -53657,31 +54703,30 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: IO[bytes], + rule_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. - Required. - :type security_user_rule_collection: IO[bytes] + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -53692,30 +54737,29 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - security_user_rule_collection: Union[_models.SecurityUserRuleCollection, IO[bytes]], + rule_collection: Union[_models.RoutingRuleCollection, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserRuleCollection: - """Creates or updates a security user rule collection. + ) -> _models.RoutingRuleCollection: + """Creates or updates a routing rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str - :param security_user_rule_collection: The Security User Rule Collection to create or update. Is - either a SecurityUserRuleCollection type or a IO[bytes] type. Required. - :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection or - IO[bytes] - :return: SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :param rule_collection: The Rule Collection to create or update. Is either a + RoutingRuleCollection type or a IO[bytes] type. Required. + :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection or IO[bytes] + :return: RoutingRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53726,19 +54770,19 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_rule_collection, (IOBase, bytes)): - _content = security_user_rule_collection + if isinstance(rule_collection, (IOBase, bytes)): + _content = rule_collection else: - _json = self._serialize.body(security_user_rule_collection, "SecurityUserRuleCollection") + _json = self._serialize.body(rule_collection, "RoutingRuleCollection") - _request = build_security_user_rule_collections_create_or_update_request( + _request = build_routing_rule_collections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53764,7 +54808,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -53781,7 +54825,7 @@ def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53792,10 +54836,10 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_rule_collections_delete_request( + _request = build_routing_rule_collections_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -53846,16 +54890,16 @@ def begin_delete( force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a Security User Rule collection. + """Deletes an routing rule collection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the @@ -53869,7 +54913,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -53912,14 +54956,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class SecurityUserRulesOperations: +class RoutingRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`security_user_rules` attribute. + :attr:`routing_rules` attribute. """ models = _models @@ -53942,17 +54986,17 @@ def list( top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.SecurityUserRule"]: - """Lists all Security User Rules in a rule collection. + ) -> Iterable["_models.RoutingRule"]: + """List all network manager routing configuration routing rules. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be @@ -53963,17 +55007,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either SecurityUserRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserRule] + :return: An iterator like instance of either RoutingRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.RoutingRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -53984,7 +55028,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_user_rules_list_request( + _request = build_routing_rules_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -54005,7 +55049,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityUserRuleListResult", pipeline_response) + deserialized = self._deserialize("RoutingRuleListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -54037,26 +55081,26 @@ def get( rule_collection_name: str, rule_name: str, **kwargs: Any - ) -> _models.SecurityUserRule: - """Gets a security user rule. + ) -> _models.RoutingRule: + """Gets a network manager routing configuration routing rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :param rule_name: The name of the rule. Required. :type rule_name: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54067,10 +55111,10 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) - _request = build_security_user_rules_get_request( + _request = build_routing_rules_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -54094,7 +55138,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -54109,32 +55153,32 @@ def create_or_update( configuration_name: str, rule_collection_name: str, rule_name: str, - security_user_rule: _models.SecurityUserRule, + routing_rule: _models.RoutingRule, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :param rule_name: The name of the rule. Required. :type rule_name: str - :param security_user_rule: The security user rule to create or update. Required. - :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule + :param routing_rule: The routing rule to create or update. Required. + :type routing_rule: ~azure.mgmt.network.models.RoutingRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -54146,32 +55190,32 @@ def create_or_update( configuration_name: str, rule_collection_name: str, rule_name: str, - security_user_rule: IO[bytes], + routing_rule: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :param rule_name: The name of the rule. Required. :type rule_name: str - :param security_user_rule: The security user rule to create or update. Required. - :type security_user_rule: IO[bytes] + :param routing_rule: The routing rule to create or update. Required. + :type routing_rule: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -54183,31 +55227,31 @@ def create_or_update( configuration_name: str, rule_collection_name: str, rule_name: str, - security_user_rule: Union[_models.SecurityUserRule, IO[bytes]], + routing_rule: Union[_models.RoutingRule, IO[bytes]], **kwargs: Any - ) -> _models.SecurityUserRule: - """Creates or updates a security user rule. + ) -> _models.RoutingRule: + """Creates or updates an routing rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :param rule_name: The name of the rule. Required. :type rule_name: str - :param security_user_rule: The security user rule to create or update. Is either a - SecurityUserRule type or a IO[bytes] type. Required. - :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule or IO[bytes] - :return: SecurityUserRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityUserRule + :param routing_rule: The routing rule to create or update. Is either a RoutingRule type or a + IO[bytes] type. Required. + :type routing_rule: ~azure.mgmt.network.models.RoutingRule or IO[bytes] + :return: RoutingRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.RoutingRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54218,19 +55262,19 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(security_user_rule, (IOBase, bytes)): - _content = security_user_rule + if isinstance(routing_rule, (IOBase, bytes)): + _content = routing_rule else: - _json = self._serialize.body(security_user_rule, "SecurityUserRule") + _json = self._serialize.body(routing_rule, "RoutingRule") - _request = build_security_user_rules_create_or_update_request( + _request = build_routing_rules_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -54257,7 +55301,7 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -54275,7 +55319,7 @@ def _delete_initial( force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54286,10 +55330,10 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_security_user_rules_delete_request( + _request = build_routing_rules_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, @@ -54342,16 +55386,16 @@ def begin_delete( force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a security user rule. + """Deletes a routing rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Security Configuration. Required. + :param configuration_name: The name of the network manager Routing Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager security Configuration rule + :param rule_collection_name: The name of the network manager routing Configuration rule collection. Required. :type rule_collection_name: str :param rule_name: The name of the rule. Required. @@ -54367,7 +55411,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -54411,14 +55455,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class NetworkManagerRoutingConfigurationsOperations: # pylint: disable=name-too-long +class ScopeConnectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_manager_routing_configurations` attribute. + :attr:`scope_connections` attribute. """ models = _models @@ -54430,184 +55474,32 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list( - self, - resource_group_name: str, - network_manager_name: str, - *, - top: Optional[int] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.NetworkManagerRoutingConfiguration"]: - """Lists all the network manager routing configurations in a network manager, in a paginated - format. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :keyword top: An optional query parameter which specifies the maximum number of records to be - returned by the server. Default value is None. - :paramtype top: int - :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. - If a previous response contains a nextLink element, the value of the nextLink element will - include a skipToken parameter that specifies a starting point to use for subsequent calls. - Default value is None. - :paramtype skip_token: str - :return: An iterator like instance of either NetworkManagerRoutingConfiguration or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkManagerRoutingConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerRoutingConfigurationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_network_manager_routing_configurations_list_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - subscription_id=self._config.subscription_id, - top=top, - skip_token=skip_token, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkManagerRoutingConfigurationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - @distributed_trace - def get( - self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Retrieves a network manager routing configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_manager_name: The name of the network manager. Required. - :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) - - _request = build_network_manager_routing_configurations_get_request( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - @overload def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - routing_configuration: _models.NetworkManagerRoutingConfiguration, + scope_connection_name: str, + parameters: _models.ScopeConnection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Required. - :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Required. + :type parameters: ~azure.mgmt.network.models.ScopeConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -54616,28 +55508,27 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - routing_configuration: IO[bytes], + scope_connection_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Required. - :type routing_configuration: IO[bytes] + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -54646,28 +55537,26 @@ def create_or_update( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, - routing_configuration: Union[_models.NetworkManagerRoutingConfiguration, IO[bytes]], + scope_connection_name: str, + parameters: Union[_models.ScopeConnection, IO[bytes]], **kwargs: Any - ) -> _models.NetworkManagerRoutingConfiguration: - """Creates or updates a network manager routing configuration. + ) -> _models.ScopeConnection: + """Creates or updates scope connection from Network Manager. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :param routing_configuration: The routing configuration to create or update. Is either a - NetworkManagerRoutingConfiguration type or a IO[bytes] type. Required. - :type routing_configuration: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration or - IO[bytes] - :return: NetworkManagerRoutingConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkManagerRoutingConfiguration + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :param parameters: Scope connection to be created/updated. Is either a ScopeConnection type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.ScopeConnection or IO[bytes] + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54678,22 +55567,22 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkManagerRoutingConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(routing_configuration, (IOBase, bytes)): - _content = routing_configuration + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(routing_configuration, "NetworkManagerRoutingConfiguration") + _json = self._serialize.body(parameters, "ScopeConnection") - _request = build_network_manager_routing_configurations_create_or_update_request( + _request = build_scope_connections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, + scope_connection_name=scope_connection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -54715,23 +55604,30 @@ def create_or_update( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkManagerRoutingConfiguration", pipeline_response.http_response) + deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - *, - force: Optional[bool] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @distributed_trace + def get( + self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any + ) -> _models.ScopeConnection: + """Get specified scope connection created by this Network Manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :return: ScopeConnection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ScopeConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54742,128 +55638,189 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ScopeConnection] = kwargs.pop("cls", None) - _request = build_network_manager_routing_configurations_delete_request( + _request = build_scope_connections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, + scope_connection_name=scope_connection_name, subscription_id=self._config.subscription_id, - force=force, api_version=api_version, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("ScopeConnection", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace - def begin_delete( + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, network_manager_name: str, scope_connection_name: str, **kwargs: Any + ) -> None: + """Delete the pending scope connection created by this network manager. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param scope_connection_name: Name for the cross-tenant connection. Required. + :type scope_connection_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scope_connections_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + scope_connection_name=scope_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 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, {}) # type: ignore + + @distributed_trace + def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, *, - force: Optional[bool] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a network manager routing configuration. + ) -> Iterable["_models.ScopeConnection"]: + """List all scope connections created by this network manager. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str - :keyword force: Deletes the resource even if it is part of a deployed configuration. If the - configuration has been deployed, the service will do a cleanup deployment in the background, - prior to the delete. Default value is None. - :paramtype force: bool - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either ScopeConnection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ScopeConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_manager_name=network_manager_name, - configuration_name=configuration_name, - force=force, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ScopeConnectionListResult] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scope_connections_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ScopeConnectionListResult", pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) -class RoutingRuleCollectionsOperations: + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SecurityAdminConfigurationsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`routing_rule_collections` attribute. + :attr:`security_admin_configurations` attribute. """ models = _models @@ -54880,21 +55837,18 @@ def list( self, resource_group_name: str, network_manager_name: str, - configuration_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RoutingRuleCollection"]: - """Lists all the rule collections in a routing configuration, in a paginated format. + ) -> Iterable["_models.SecurityAdminConfiguration"]: + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. - :type configuration_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -54903,18 +55857,18 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either RoutingRuleCollection or the result of + :return: An iterator like instance of either SecurityAdminConfiguration or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.RoutingRuleCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityAdminConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleCollectionListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityAdminConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -54925,10 +55879,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_routing_rule_collections_list_request( + _request = build_security_admin_configurations_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, - configuration_name=configuration_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -54945,7 +55898,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("RoutingRuleCollectionListResult", pipeline_response) + deserialized = self._deserialize("SecurityAdminConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -54962,7 +55915,8 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -54970,30 +55924,21 @@ def get_next(next_link=None): @distributed_trace def get( - self, - resource_group_name: str, - network_manager_name: str, - configuration_name: str, - rule_collection_name: str, - **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Gets a network manager routing configuration rule collection. + self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any + ) -> _models.SecurityAdminConfiguration: + """Retrieves a network manager security admin configuration. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55004,14 +55949,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) - _request = build_routing_rule_collections_get_request( + _request = build_security_admin_configurations_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -55028,9 +55972,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -55043,31 +55988,27 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_collection: _models.RoutingRuleCollection, + security_admin_configuration: _models.SecurityAdminConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection + :param security_admin_configuration: The security admin configuration to create or update. + Required. + :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -55077,31 +56018,27 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_collection: IO[bytes], + security_admin_configuration: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Required. - :type rule_collection: IO[bytes] + :param security_admin_configuration: The security admin configuration to create or update. + Required. + :type security_admin_configuration: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -55111,30 +56048,26 @@ def create_or_update( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, - rule_collection: Union[_models.RoutingRuleCollection, IO[bytes]], + security_admin_configuration: Union[_models.SecurityAdminConfiguration, IO[bytes]], **kwargs: Any - ) -> _models.RoutingRuleCollection: - """Creates or updates a routing rule collection. + ) -> _models.SecurityAdminConfiguration: + """Creates or updates a network manager security admin configuration. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str - :param rule_collection: The Rule Collection to create or update. Is either a - RoutingRuleCollection type or a IO[bytes] type. Required. - :type rule_collection: ~azure.mgmt.network.models.RoutingRuleCollection or IO[bytes] - :return: RoutingRuleCollection or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRuleCollection + :param security_admin_configuration: The security admin configuration to create or update. Is + either a SecurityAdminConfiguration type or a IO[bytes] type. Required. + :type security_admin_configuration: ~azure.mgmt.network.models.SecurityAdminConfiguration or + IO[bytes] + :return: SecurityAdminConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityAdminConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55145,23 +56078,22 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutingRuleCollection] = kwargs.pop("cls", None) + cls: ClsType[_models.SecurityAdminConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(rule_collection, (IOBase, bytes)): - _content = rule_collection + if isinstance(security_admin_configuration, (IOBase, bytes)): + _content = security_admin_configuration else: - _json = self._serialize.body(rule_collection, "RoutingRuleCollection") + _json = self._serialize.body(security_admin_configuration, "SecurityAdminConfiguration") - _request = build_routing_rule_collections_create_or_update_request( + _request = build_security_admin_configurations_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -55181,9 +56113,10 @@ def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRuleCollection", pipeline_response.http_response) + deserialized = self._deserialize("SecurityAdminConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -55195,12 +56128,11 @@ def _delete_initial( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55211,14 +56143,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_routing_rule_collections_delete_request( + _request = build_security_admin_configurations_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -55241,7 +56172,8 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: @@ -55260,23 +56192,18 @@ def begin_delete( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes an routing rule collection. + """Deletes a network manager security admin configuration. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -55288,7 +56215,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -55298,7 +56225,6 @@ def begin_delete( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -55331,14 +56257,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class RoutingRulesOperations: +class AdminRuleCollectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`routing_rules` attribute. + :attr:`admin_rule_collections` attribute. """ models = _models @@ -55356,24 +56282,19 @@ def list( resource_group_name: str, network_manager_name: str, configuration_name: str, - rule_collection_name: str, *, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RoutingRule"]: - """List all network manager routing configuration routing rules. + ) -> Iterable["_models.AdminRuleCollection"]: + """Lists all the rule collections in a security admin configuration, in a paginated format. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule - collection. Required. - :type rule_collection_name: str :keyword top: An optional query parameter which specifies the maximum number of records to be returned by the server. Default value is None. :paramtype top: int @@ -55382,17 +56303,17 @@ def list( include a skipToken parameter that specifies a starting point to use for subsequent calls. Default value is None. :paramtype skip_token: str - :return: An iterator like instance of either RoutingRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.RoutingRule] + :return: An iterator like instance of either AdminRuleCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.AdminRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55403,11 +56324,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_routing_rules_list_request( + _request = build_admin_rule_collections_list_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, - rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, top=top, skip_token=skip_token, @@ -55424,7 +56344,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("RoutingRuleListResult", pipeline_response) + deserialized = self._deserialize("AdminRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -55441,7 +56361,8 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -55454,28 +56375,24 @@ def get( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, **kwargs: Any - ) -> _models.RoutingRule: - """Gets a network manager routing configuration routing rule. + ) -> _models.AdminRuleCollection: + """Gets a network manager security admin configuration rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55486,15 +56403,14 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) - _request = build_routing_rules_get_request( + _request = build_admin_rule_collections_get_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -55511,9 +56427,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) + deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -55527,33 +56444,29 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, - routing_rule: _models.RoutingRule, + rule_collection: _models.AdminRuleCollection, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Required. - :type routing_rule: ~azure.mgmt.network.models.RoutingRule + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -55564,33 +56477,29 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, - routing_rule: IO[bytes], + rule_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Required. - :type routing_rule: IO[bytes] + :param rule_collection: The Rule Collection to create or update. Required. + :type rule_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -55601,32 +56510,28 @@ def create_or_update( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, - routing_rule: Union[_models.RoutingRule, IO[bytes]], + rule_collection: Union[_models.AdminRuleCollection, IO[bytes]], **kwargs: Any - ) -> _models.RoutingRule: - """Creates or updates an routing rule. + ) -> _models.AdminRuleCollection: + """Creates or updates an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str - :param routing_rule: The routing rule to create or update. Is either a RoutingRule type or a - IO[bytes] type. Required. - :type routing_rule: ~azure.mgmt.network.models.RoutingRule or IO[bytes] - :return: RoutingRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.RoutingRule + :param rule_collection: The Rule Collection to create or update. Is either a + AdminRuleCollection type or a IO[bytes] type. Required. + :type rule_collection: ~azure.mgmt.network.models.AdminRuleCollection or IO[bytes] + :return: AdminRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.AdminRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55637,24 +56542,23 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutingRule] = kwargs.pop("cls", None) + cls: ClsType[_models.AdminRuleCollection] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(routing_rule, (IOBase, bytes)): - _content = routing_rule + if isinstance(rule_collection, (IOBase, bytes)): + _content = rule_collection else: - _json = self._serialize.body(routing_rule, "RoutingRule") + _json = self._serialize.body(rule_collection, "AdminRuleCollection") - _request = build_routing_rules_create_or_update_request( + _request = build_admin_rule_collections_create_or_update_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -55674,9 +56578,10 @@ def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutingRule", pipeline_response.http_response) + deserialized = self._deserialize("AdminRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -55689,12 +56594,11 @@ def _delete_initial( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55705,15 +56609,14 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_routing_rules_delete_request( + _request = build_admin_rule_collections_delete_request( resource_group_name=resource_group_name, network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, - rule_name=rule_name, subscription_id=self._config.subscription_id, force=force, api_version=api_version, @@ -55736,7 +56639,8 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: @@ -55756,25 +56660,21 @@ def begin_delete( network_manager_name: str, configuration_name: str, rule_collection_name: str, - rule_name: str, *, force: Optional[bool] = None, **kwargs: Any ) -> LROPoller[None]: - """Deletes a routing rule. + """Deletes an admin rule collection. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. + :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str :param network_manager_name: The name of the network manager. Required. :type network_manager_name: str - :param configuration_name: The name of the network manager Routing Configuration. Required. + :param configuration_name: The name of the network manager Security Configuration. Required. :type configuration_name: str - :param rule_collection_name: The name of the network manager routing Configuration rule + :param rule_collection_name: The name of the network manager security Configuration rule collection. Required. :type rule_collection_name: str - :param rule_name: The name of the rule. Required. - :type rule_name: str :keyword force: Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service will do a cleanup deployment in the background, prior to the delete. Default value is None. @@ -55786,7 +56686,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -55797,7 +56697,6 @@ def begin_delete( network_manager_name=network_manager_name, configuration_name=configuration_name, rule_collection_name=rule_collection_name, - rule_name=rule_name, force=force, api_version=api_version, cls=lambda x, y, z: x, @@ -55830,14 +56729,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class NetworkProfilesOperations: +class AdminRulesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_profiles` attribute. + :attr:`admin_rules` attribute. """ models = _models @@ -55849,8 +56748,48 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_initial(self, resource_group_name: str, network_profile_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.BaseAdminRule"]: + """List all network manager security configuration admin rules. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either BaseAdminRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.BaseAdminRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.AdminRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55858,116 +56797,82 @@ def _delete_initial(self, resource_group_name: str, network_profile_name: str, * } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_network_profiles_delete_request( - resource_group_name=resource_group_name, - network_profile_name=network_profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + def prepare_request(next_link=None): + if not next_link: - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + _request = build_admin_rules_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - return deserialized # type: ignore + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request - @distributed_trace - def begin_delete(self, resource_group_name: str, network_profile_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified network profile. + def extract_data(pipeline_response): + deserialized = self._deserialize("AdminRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the NetworkProfile. Required. - :type network_profile_name: str - :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: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def get_next(next_link=None): + _request = prepare_request(next_link) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + response = pipeline_response.http_response - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return pipeline_response + + return ItemPaged(get_next, extract_data) @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. + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> _models.BaseAdminRule: + """Gets a network manager security configuration admin rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the public IP prefix. Required. - :type network_profile_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -55978,14 +56883,16 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) - _request = build_network_profiles_get_request( + _request = build_admin_rules_get_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, - expand=expand, api_version=api_version, headers=_headers, params=_params, @@ -56001,9 +56908,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) + deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -56014,26 +56922,35 @@ def get( def create_or_update( self, resource_group_name: str, - network_profile_name: str, - parameters: _models.NetworkProfile, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + admin_rule: _models.BaseAdminRule, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. - Required. - :type parameters: ~azure.mgmt.network.models.NetworkProfile + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Required. + :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -56041,26 +56958,35 @@ def create_or_update( def create_or_update( self, resource_group_name: str, - network_profile_name: str, - parameters: IO[bytes], + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + admin_rule: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. - Required. - :type parameters: IO[bytes] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Required. + :type admin_rule: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ @@ -56068,24 +56994,34 @@ def create_or_update( def create_or_update( self, resource_group_name: str, - network_profile_name: str, - parameters: Union[_models.NetworkProfile, IO[bytes]], + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + admin_rule: Union[_models.BaseAdminRule, IO[bytes]], **kwargs: Any - ) -> _models.NetworkProfile: - """Creates or updates a network profile. + ) -> _models.BaseAdminRule: + """Creates or updates an admin rule. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to the create or update network profile operation. Is - either a NetworkProfile type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkProfile or IO[bytes] - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param admin_rule: The admin rule to create or update. Is either a BaseAdminRule type or a + IO[bytes] type. Required. + :type admin_rule: ~azure.mgmt.network.models.BaseAdminRule or IO[bytes] + :return: BaseAdminRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.BaseAdminRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56096,21 +57032,24 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + cls: ClsType[_models.BaseAdminRule] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(admin_rule, (IOBase, bytes)): + _content = admin_rule else: - _json = self._serialize.body(parameters, "NetworkProfile") + _json = self._serialize.body(admin_rule, "BaseAdminRule") - _request = build_network_profiles_create_or_update_request( + _request = build_admin_rules_create_or_update_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, @@ -56130,89 +57069,28 @@ def create_or_update( 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) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) + deserialized = self._deserialize("BaseAdminRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def update_tags( - self, - resource_group_name: str, - network_profile_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update_tags( + def _delete_initial( self, resource_group_name: str, - network_profile_name: str, - parameters: IO[bytes], + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update_tags( - self, - resource_group_name: str, - network_profile_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], + force: Optional[bool] = None, **kwargs: Any - ) -> _models.NetworkProfile: - """Updates network profile tags. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_profile_name: The name of the network profile. Required. - :type network_profile_name: str - :param parameters: Parameters supplied to update network profile tags. Is either a TagsObject - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NetworkProfile or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56220,132 +57098,191 @@ def update_tags( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagsObject") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_network_profiles_update_tags_request( + _request = build_admin_rules_delete_request( resource_group_name=resource_group_name, - network_profile_name=network_profile_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, subscription_id=self._config.subscription_id, + force=force, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkProfile"]: - """Gets all the network profiles in a subscription. + def begin_delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + *, + force: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an admin rule. - :return: An iterator like instance of either NetworkProfile or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkProfile] + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, + force=force, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) - list_of_elem = deserialized.value + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) + return cls(pipeline_response, None, {}) # type: ignore - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) - response = pipeline_response.http_response + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return pipeline_response +class SecurityUserConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - return ItemPaged(get_next, extract_data) + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`security_user_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkProfile"]: - """Gets all network profiles in a resource group. + def list( + self, + resource_group_name: str, + network_manager_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.SecurityUserConfiguration"]: + """Lists all the network manager security user configurations in a network manager, in a paginated + format. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :return: An iterator like instance of either NetworkProfile or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkProfile] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either SecurityUserConfiguration or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserConfigurationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56356,9 +57293,12 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Net def prepare_request(next_link=None): if not next_link: - _request = build_network_profiles_list_request( + _request = build_security_user_configurations_list_request( resource_group_name=resource_group_name, + network_manager_name=network_manager_name, subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, api_version=api_version, headers=_headers, params=_params, @@ -56372,7 +57312,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + deserialized = self._deserialize("SecurityUserConfigurationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -56395,30 +57335,24 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + @distributed_trace + def get( + self, resource_group_name: str, network_manager_name: str, configuration_name: str, **kwargs: Any + ) -> _models.SecurityUserConfiguration: + """Retrieves a network manager security user configuration. -class NetworkSecurityGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`network_security_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _delete_initial( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56429,12 +57363,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) - _request = build_network_security_groups_delete_request( + _request = build_security_user_configurations_get_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -56442,102 +57377,113 @@ def _delete_initial( ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def begin_delete( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the specified network security group. + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_user_configuration: _models.SecurityUserConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + Required. + :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_user_configuration: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + Required. + :type security_user_configuration: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ @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. + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_user_configuration: Union[_models.SecurityUserConfiguration, IO[bytes]], + **kwargs: Any + ) -> _models.SecurityUserConfiguration: + """Creates or updates a network manager security user configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :keyword expand: Expands referenced resources. Default value is None. - :paramtype expand: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. Is + either a SecurityUserConfiguration type or a IO[bytes] type. Required. + :type security_user_configuration: ~azure.mgmt.network.models.SecurityUserConfiguration or + IO[bytes] + :return: SecurityUserConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56545,18 +57491,30 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityUserConfiguration] = kwargs.pop("cls", None) - _request = build_network_security_groups_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(security_user_configuration, (IOBase, bytes)): + _content = security_user_configuration + else: + _json = self._serialize.body(security_user_configuration, "SecurityUserConfiguration") + + _request = build_security_user_configurations_create_or_update_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, - expand=expand, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -56569,25 +57527,27 @@ def get( response = pipeline_response.http_response - if response.status_code not in [200]: + 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) - deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserConfiguration", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_or_update_initial( + def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, - parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + network_manager_name: str, + configuration_name: str, + *, + force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56595,29 +57555,19 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NetworkSecurityGroup") - - _request = build_network_security_groups_create_or_update_request( + _request = build_security_user_configurations_delete_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, + force=force, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -56631,7 +57581,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -56639,107 +57589,59 @@ def _create_or_update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - network_security_group_name: str, - parameters: _models.NetworkSecurityGroup, - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Required. - :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - network_security_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **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. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace - def begin_create_or_update( + def begin_delete( self, resource_group_name: str, - network_security_group_name: str, - parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + network_manager_name: str, + configuration_name: str, + *, + force: Optional[bool] = None, **kwargs: Any - ) -> LROPoller[_models.NetworkSecurityGroup]: - """Creates or updates a network security group in the specified resource group. + ) -> LROPoller[None]: + """Deletes a network manager security user configuration. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. Is either a NetworkSecurityGroup type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup or IO[bytes] - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + force=force, api_version=api_version, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -56748,174 +57650,88 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.NetworkSecurityGroup].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.NetworkSecurityGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @overload - def update_tags( - self, - resource_group_name: str, - network_security_group_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ +class SecurityUserRuleCollectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def update_tags( - self, - resource_group_name: str, - network_security_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`security_user_rule_collections` attribute. + """ - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def update_tags( + def list( self, resource_group_name: str, - network_security_group_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], + network_manager_name: str, + configuration_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, **kwargs: Any - ) -> _models.NetworkSecurityGroup: - """Updates a network security group tags. + ) -> Iterable["_models.SecurityUserRuleCollection"]: + """Lists all the security user rule collections in a security configuration, in a paginated + format. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. Is either a - TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] - :return: NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _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, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [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.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkSecurityGroup"]: - """Gets all network security groups in a subscription. - - :return: An iterator like instance of either NetworkSecurityGroup or the result of + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either SecurityUserRuleCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserRuleCollection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -56926,8 +57742,13 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkSecurityGroup"]: def prepare_request(next_link=None): if not next_link: - _request = build_network_security_groups_list_all_request( + _request = build_security_user_rule_collections_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, api_version=api_version, headers=_headers, params=_params, @@ -56941,7 +57762,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + deserialized = self._deserialize("SecurityUserRuleCollectionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -56965,96 +57786,31 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkSecurityGroup"]: - """Gets all network security groups in a resource group. + def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> _models.SecurityUserRuleCollection: + """Gets a network manager security user configuration rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :return: An iterator like instance of either NetworkSecurityGroup or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping[int, Type[HttpResponseError]] = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - 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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - _request = HttpRequest("GET", next_link) - _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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - 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) - - -class SecurityRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`security_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _delete_initial( - self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57065,13 +57821,14 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) - _request = build_security_rules_delete_request( + _request = build_security_user_rule_collections_get_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, @@ -57079,105 +57836,125 @@ def _delete_initial( ) _request.url = self._client.format_url(_request.url) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def begin_delete( - self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the specified network security rule. + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + security_user_rule_collection: _models.SecurityUserRuleCollection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. + Required. + :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + security_user_rule_collection: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. + Required. + :type security_user_rule_collection: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ @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. + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + security_user_rule_collection: Union[_models.SecurityUserRuleCollection, IO[bytes]], + **kwargs: Any + ) -> _models.SecurityUserRuleCollection: + """Creates or updates a security user rule collection. - :param resource_group_name: The name of the resource group. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :return: SecurityRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityRule + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param security_user_rule_collection: The Security User Rule Collection to create or update. Is + either a SecurityUserRuleCollection type or a IO[bytes] type. Required. + :type security_user_rule_collection: ~azure.mgmt.network.models.SecurityUserRuleCollection or + IO[bytes] + :return: SecurityUserRuleCollection or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRuleCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57185,18 +57962,31 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityUserRuleCollection] = kwargs.pop("cls", None) - _request = build_security_rules_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(security_user_rule_collection, (IOBase, bytes)): + _content = security_user_rule_collection + else: + _json = self._serialize.body(security_user_rule_collection, "SecurityUserRuleCollection") + + _request = build_security_user_rule_collections_create_or_update_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -57209,26 +57999,28 @@ def get( response = pipeline_response.http_response - if response.status_code not in [200]: + 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) - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + deserialized = self._deserialize("SecurityUserRuleCollection", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_or_update_initial( + def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + *, + force: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57236,30 +58028,20 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_rule_parameters, (IOBase, bytes)): - _content = security_rule_parameters - else: - _json = self._serialize.body(security_rule_parameters, "SecurityRule") - - _request = build_security_rules_create_or_update_request( + _request = build_security_user_rule_collections_delete_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, subscription_id=self._config.subscription_id, + force=force, api_version=api_version, - content_type=content_type, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -57273,7 +58055,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -57281,117 +58063,3271 @@ def _create_or_update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @overload - def begin_create_or_update( + @distributed_trace + def begin_delete( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + *, + force: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Security User Rule collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + force=force, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class SecurityUserRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`security_user_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + *, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.SecurityUserRule"]: + """Lists all Security User Rules in a rule collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :keyword top: An optional query parameter which specifies the maximum number of records to be + returned by the server. Default value is None. + :paramtype top: int + :keyword skip_token: SkipToken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skip_token: str + :return: An iterator like instance of either SecurityUserRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityUserRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_security_user_rules_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + subscription_id=self._config.subscription_id, + top=top, + skip_token=skip_token, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityUserRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @distributed_trace + def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> _models.SecurityUserRule: + """Gets a security user rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + + _request = build_security_user_rules_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + security_user_rule: _models.SecurityUserRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Required. + :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + security_user_rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Required. + :type security_user_rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + security_user_rule: Union[_models.SecurityUserRule, IO[bytes]], + **kwargs: Any + ) -> _models.SecurityUserRule: + """Creates or updates a security user rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :param security_user_rule: The security user rule to create or update. Is either a + SecurityUserRule type or a IO[bytes] type. Required. + :type security_user_rule: ~azure.mgmt.network.models.SecurityUserRule or IO[bytes] + :return: SecurityUserRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityUserRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityUserRule] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(security_user_rule, (IOBase, bytes)): + _content = security_user_rule + else: + _json = self._serialize.body(security_user_rule, "SecurityUserRule") + + _request = build_security_user_rules_create_or_update_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + + deserialized = self._deserialize("SecurityUserRule", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + *, + force: Optional[bool] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_security_user_rules_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + force=force, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + *, + force: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a security user rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param configuration_name: The name of the network manager Security Configuration. Required. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. Required. + :type rule_collection_name: str + :param rule_name: The name of the rule. Required. + :type rule_name: str + :keyword force: Deletes the resource even if it is part of a deployed configuration. If the + configuration has been deployed, the service will do a cleanup deployment in the background, + prior to the delete. Default value is None. + :paramtype force: bool + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + configuration_name=configuration_name, + rule_collection_name=rule_collection_name, + rule_name=rule_name, + force=force, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class NetworkProfilesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_profiles` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _delete_initial(self, resource_group_name: str, network_profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_profiles_delete_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(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. Required. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. Required. + :type network_profile_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param network_profile_name: The name of the public IP prefix. Required. + :type network_profile_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + + _request = build_network_profiles_get_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + expand=expand, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: _models.NetworkProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkProfile: + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + Required. + :type parameters: ~azure.mgmt.network.models.NetworkProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkProfile: + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: Union[_models.NetworkProfile, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkProfile: + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. Is + either a NetworkProfile type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkProfile or IO[bytes] + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + + deserialized = self._deserialize("NetworkProfile", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkProfile: + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. Required. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. Is either a TagsObject + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: NetworkProfile or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkProfile] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkProfile"]: + """Gets all the network profiles in a subscription. + + :return: An iterator like instance of either NetworkProfile or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @distributed_trace + def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkProfile"]: + """Gets all network profiles in a resource group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :return: An iterator like instance of either NetworkProfile or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkProfileListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class NetworkSecurityGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`network_security_groups` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _delete_initial( + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_security_groups_delete_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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :keyword expand: Expands referenced resources. Default value is None. + :paramtype expand: str + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + + _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, + expand=expand, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "NetworkSecurityGroup") + + _request = build_network_security_groups_create_or_update_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, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: _models.NetworkSecurityGroup, + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Required. + :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: Union[_models.NetworkSecurityGroup, IO[bytes]], + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. Is either a NetworkSecurityGroup type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.NetworkSecurityGroup or IO[bytes] + :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroup", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkSecurityGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkSecurityGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def update_tags( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.NetworkSecurityGroup: + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. Is either a + TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.network.models.TagsObject or IO[bytes] + :return: NetworkSecurityGroup or the result of cls(response) + :rtype: ~azure.mgmt.network.models.NetworkSecurityGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkSecurityGroup] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _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, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkSecurityGroup"]: + """Gets all network security groups in a subscription. + + :return: An iterator like instance of either NetworkSecurityGroup or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @distributed_trace + def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkSecurityGroup"]: + """Gets all network security groups in a resource group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :return: An iterator like instance of either NetworkSecurityGroup or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.NetworkSecurityGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.NetworkSecurityGroupListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class SecurityRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`security_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _delete_initial( + self, resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_security_rules_delete_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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :return: SecurityRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(security_rule_parameters, (IOBase, bytes)): + _content = security_rule_parameters + else: + _json = self._serialize.body(security_rule_parameters, "SecurityRule") + + _request = build_security_rules_create_or_update_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, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, security_rule_parameters: _models.SecurityRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.SecurityRule]: - """Creates or updates a security rule in the specified network security group. + ) -> 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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Required. + :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: IO[bytes], + *, + content_type: str = "application/json", + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Required. + :type security_rule_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + **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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. Required. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. Is either a SecurityRule type or a IO[bytes] type. Required. + :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule or IO[bytes] + :return: An instance of LROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SecurityRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SecurityRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + ) -> Iterable["_models.SecurityRule"]: + """Gets all security rules in a network security group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :return: An iterator like instance of either SecurityRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + +class DefaultSecurityRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`default_security_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, network_security_group_name: str, **kwargs: Any + ) -> Iterable["_models.SecurityRule"]: + """Gets all default security rules in a network security group. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :return: An iterator like instance of either SecurityRule or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + 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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _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) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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) + + @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. Required. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. Required. + :type network_security_group_name: str + :param default_security_rule_name: The name of the default security rule. Required. + :type default_security_rule_name: str + :return: SecurityRule or the result of cls(response) + :rtype: ~azure.mgmt.network.models.SecurityRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + + _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, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [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.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ReachabilityAnalysisIntentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`reachability_analysis_intents` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ReachabilityAnalysisIntent"]: + """Gets list of Reachability Analysis Intents . + + Gets list of Reachability Analysis Intents . + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either ReachabilityAnalysisIntent or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ReachabilityAnalysisIntent] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisIntentListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reachability_analysis_intents_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReachabilityAnalysisIntentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + **kwargs: Any + ) -> _models.ReachabilityAnalysisIntent: + """Get the Reachability Analysis Intent. + + Get the Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisIntent] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_intents_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisIntent", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: _models.ReachabilityAnalysisIntent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + body: Union[_models.ReachabilityAnalysisIntent, IO[bytes]], + **kwargs: Any + ) -> _models.ReachabilityAnalysisIntent: + """Creates Reachability Analysis Intent. + + Creates Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :param body: Reachability Analysis Intent object to create/update. Is either a + ReachabilityAnalysisIntent type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisIntent or IO[bytes] + :return: ReachabilityAnalysisIntent or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisIntent + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ReachabilityAnalysisIntent] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ReachabilityAnalysisIntent") + + _request = build_reachability_analysis_intents_create_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisIntent", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_intent_name: str, + **kwargs: Any + ) -> None: + """Deletes Reachability Analysis Intent. + + Deletes Reachability Analysis Intent. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_intent_name: Reachability Analysis Intent name. Required. + :type reachability_analysis_intent_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_intents_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_intent_name=reachability_analysis_intent_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ReachabilityAnalysisRunsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`reachability_analysis_runs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ReachabilityAnalysisRun"]: + """Gets list of Reachability Analysis Runs. + + Gets list of Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either ReachabilityAnalysisRun or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.ReachabilityAnalysisRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisRunListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reachability_analysis_runs_list_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + _request = HttpRequest("GET", next_link) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReachabilityAnalysisRunListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Gets Reachability Analysis Run. + + Gets Reachability Analysis Run. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.ReachabilityAnalysisRun] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_runs_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: _models.ReachabilityAnalysisRun, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + body: Union[_models.ReachabilityAnalysisRun, IO[bytes]], + **kwargs: Any + ) -> _models.ReachabilityAnalysisRun: + """Creates Reachability Analysis Runs. + + Creates Reachability Analysis Runs. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :param body: Analysis Run resource object to create/update. Is either a ReachabilityAnalysisRun + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.ReachabilityAnalysisRun or IO[bytes] + :return: ReachabilityAnalysisRun or the result of cls(response) + :rtype: ~azure.mgmt.network.models.ReachabilityAnalysisRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ReachabilityAnalysisRun] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ReachabilityAnalysisRun") + + _request = build_reachability_analysis_runs_create_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReachabilityAnalysisRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_reachability_analysis_runs_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Required. - :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SecurityRule]: - """Creates or updates a security rule in the specified network security group. + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Required. - :type security_rule_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - def begin_create_or_update( + def begin_delete( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: Union[_models.SecurityRule, IO[bytes]], + network_manager_name: str, + workspace_name: str, + reachability_analysis_run_name: str, **kwargs: Any - ) -> LROPoller[_models.SecurityRule]: - """Creates or updates a security rule in the specified network security group. + ) -> LROPoller[None]: + """Deletes Reachability Analysis Run. + + Deletes Reachability Analysis Run. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. Required. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. Is either a SecurityRule type or a IO[bytes] type. Required. - :type security_rule_parameters: ~azure.mgmt.network.models.SecurityRule or IO[bytes] - :return: An instance of LROPoller that returns either SecurityRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.models.SecurityRule] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param reachability_analysis_run_name: Reachability Analysis Run name. Required. + :type reachability_analysis_run_name: str + :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: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + 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, - security_rule_parameters=security_rule_parameters, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + reachability_analysis_run_name=reachability_analysis_run_name, api_version=api_version, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -57400,52 +61336,89 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: - return LROPoller[_models.SecurityRule].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.SecurityRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class VerifierWorkspacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.network.NetworkManagementClient`'s + :attr:`verifier_workspaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> Iterable["_models.SecurityRule"]: - """Gets all security rules in a network security group. + self, + resource_group_name: str, + network_manager_name: str, + *, + skip_token: Optional[str] = None, + skip: int = 0, + top: int = 50, + sort_key: Optional[str] = None, + sort_value: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.VerifierWorkspace"]: + """Gets list of Verifier Workspaces. + + Gets list of Verifier Workspaces. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :return: An iterator like instance of either SecurityRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityRule] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :keyword skip_token: Optional skip token. Default value is None. + :paramtype skip_token: str + :keyword skip: Optional num entries to skip. Default value is 0. + :paramtype skip: int + :keyword top: Optional num entries to show. Default value is 50. + :paramtype top: int + :keyword sort_key: Optional key by which to sort. Default value is None. + :paramtype sort_key: str + :keyword sort_value: Optional sort value for pagination. Default value is None. + :paramtype sort_value: str + :return: An iterator like instance of either VerifierWorkspace or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.VerifierWorkspace] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.VerifierWorkspaceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57456,10 +61429,15 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_security_rules_list_request( + _request = build_verifier_workspaces_list_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + network_manager_name=network_manager_name, subscription_id=self._config.subscription_id, + skip_token=skip_token, + skip=skip, + top=top, + sort_key=sort_key, + sort_value=sort_value, api_version=api_version, headers=_headers, params=_params, @@ -57473,7 +61451,7 @@ def prepare_request(next_link=None): return _request def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityRuleListResult", pipeline_response) + deserialized = self._deserialize("VerifierWorkspaceListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -57490,53 +61468,164 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + @distributed_trace + def get( + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> _models.VerifierWorkspace: + """Gets Verifier Workspace. -class DefaultSecurityRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + Gets Verifier Workspace. - Instead, you should access the following operations through - :class:`~azure.mgmt.network.NetworkManagementClient`'s - :attr:`default_security_rules` attribute. - """ + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - models = _models + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) - @distributed_trace - def list( - self, resource_group_name: str, network_security_group_name: str, **kwargs: Any - ) -> Iterable["_models.SecurityRule"]: - """Gets all default security rules in a network security group. + _request = build_verifier_workspaces_get_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: _models.VerifierWorkspace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :return: An iterator like instance of either SecurityRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.models.SecurityRule] + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Required. + :type body: ~azure.mgmt.network.models.VerifierWorkspace + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRuleListResult] = kwargs.pop("cls", None) + @overload + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: Union[_models.VerifierWorkspace, IO[bytes]], + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Creates Verifier Workspace. + + Creates Verifier Workspace. - error_map: MutableMapping[int, Type[HttpResponseError]] = { + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Is either a VerifierWorkspace type or + a IO[bytes] type. Required. + :type body: ~azure.mgmt.network.models.VerifierWorkspace or IO[bytes] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57544,66 +61633,143 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) - else: - _request = HttpRequest("GET", next_link) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = self._serialize.body(body, "VerifierWorkspace") - 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) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + _request = build_verifier_workspaces_create_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - def get_next(next_link=None): - _request = prepare_request(next_link) + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + response = pipeline_response.http_response - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + 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.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) - return ItemPaged(get_next, extract_data) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: Optional[_models.VerifierWorkspaceUpdate] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. + + Updates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Default value is None. + :type body: ~azure.mgmt.network.models.VerifierWorkspaceUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. + + Updates Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace + :raises ~azure.core.exceptions.HttpResponseError: + """ @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. + def update( + self, + resource_group_name: str, + network_manager_name: str, + workspace_name: str, + body: Optional[Union[_models.VerifierWorkspaceUpdate, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.VerifierWorkspace: + """Updates Verifier Workspace. + + Updates Verifier Workspace. :param resource_group_name: The name of the resource group. Required. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. Required. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. Required. - :type default_security_rule_name: str - :return: SecurityRule or the result of cls(response) - :rtype: ~azure.mgmt.network.models.SecurityRule + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :param body: Verifier Workspace object to create/update. Is either a VerifierWorkspaceUpdate + type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.network.models.VerifierWorkspaceUpdate or IO[bytes] + :return: VerifierWorkspace or the result of cls(response) + :rtype: ~azure.mgmt.network.models.VerifierWorkspace :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57611,18 +61777,33 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) - cls: ClsType[_models.SecurityRule] = kwargs.pop("cls", None) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.VerifierWorkspace] = kwargs.pop("cls", None) - _request = build_default_security_rules_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "VerifierWorkspaceUpdate") + else: + _json = None + + _request = build_verifier_workspaces_update_request( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - default_security_rule_name=default_security_rule_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, subscription_id=self._config.subscription_id, api_version=api_version, + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) @@ -57637,15 +61818,133 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityRule", pipeline_response.http_response) + deserialized = self._deserialize("VerifierWorkspace", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + def _delete_initial( + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_verifier_workspaces_delete_request( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommonErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, network_manager_name: str, workspace_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes Verifier Workspace. + + Deletes Verifier Workspace. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. Required. + :type network_manager_name: str + :param workspace_name: Workspace name. Required. + :type workspace_name: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_manager_name=network_manager_name, + workspace_name=workspace_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + class NetworkVirtualAppliancesOperations: """ @@ -57669,7 +61968,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57680,7 +61979,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_virtual_appliances_delete_request( @@ -57737,7 +62036,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -57797,7 +62096,7 @@ def get( :rtype: ~azure.mgmt.network.models.NetworkVirtualAppliance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57808,7 +62107,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) _request = build_network_virtual_appliances_get_request( @@ -57916,7 +62215,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.NetworkVirtualAppliance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57927,7 +62226,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) @@ -57977,7 +62276,7 @@ def _create_or_update_initial( parameters: Union[_models.NetworkVirtualAppliance, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -57988,7 +62287,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -58121,7 +62420,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualAppliance] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -58176,7 +62475,7 @@ def _restart_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58187,7 +62486,7 @@ def _restart_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -58333,7 +62632,7 @@ def begin_restart( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualApplianceInstanceIds] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -58395,10 +62694,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58460,10 +62759,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.NetworkVirtualAppliance"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58535,7 +62834,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, site_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58546,7 +62845,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_appliance_sites_delete_request( @@ -58602,7 +62901,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -58658,7 +62957,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualApplianceSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58669,7 +62968,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualApplianceSite] = kwargs.pop("cls", None) _request = build_virtual_appliance_sites_get_request( @@ -58709,7 +63008,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualApplianceSite, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -58720,7 +63019,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -58859,7 +63158,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualApplianceSite] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -58924,10 +63223,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSiteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59010,10 +63309,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.NetworkVirtualApplianceSku"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSkuListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59072,7 +63371,7 @@ def get(self, sku_name: str, **kwargs: Any) -> _models.NetworkVirtualApplianceSk :rtype: ~azure.mgmt.network.models.NetworkVirtualApplianceSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59083,7 +63382,7 @@ def get(self, sku_name: str, **kwargs: Any) -> _models.NetworkVirtualApplianceSk _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceSku] = kwargs.pop("cls", None) _request = build_virtual_appliance_skus_get_request( @@ -59141,7 +63440,7 @@ def _create_or_update_initial( parameters: Union[_models.InboundSecurityRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59152,7 +63451,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -59292,7 +63591,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.InboundSecurityRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -59355,7 +63654,7 @@ def get( :rtype: ~azure.mgmt.network.models.InboundSecurityRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59366,7 +63665,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.InboundSecurityRule] = kwargs.pop("cls", None) _request = build_inbound_security_rule_get_request( @@ -59491,7 +63790,7 @@ def create_or_update( :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59502,7 +63801,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) @@ -59558,7 +63857,7 @@ def get(self, resource_group_name: str, network_watcher_name: str, **kwargs: Any :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59569,7 +63868,7 @@ def get(self, resource_group_name: str, network_watcher_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) _request = build_network_watchers_get_request( @@ -59602,7 +63901,7 @@ def get(self, resource_group_name: str, network_watcher_name: str, **kwargs: Any return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, network_watcher_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59613,7 +63912,7 @@ def _delete_initial(self, resource_group_name: str, network_watcher_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_watchers_delete_request( @@ -59665,7 +63964,7 @@ def begin_delete(self, resource_group_name: str, network_watcher_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -59777,7 +64076,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.NetworkWatcher :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59788,7 +64087,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkWatcher] = kwargs.pop("cls", None) @@ -59845,10 +64144,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Net _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcherListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -59910,10 +64209,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.NetworkWatcher"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkWatcherListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60036,7 +64335,7 @@ def get_topology( :rtype: ~azure.mgmt.network.models.Topology :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60047,7 +64346,7 @@ def get_topology( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Topology] = kwargs.pop("cls", None) @@ -60098,7 +64397,7 @@ def _verify_ip_flow_initial( parameters: Union[_models.VerificationIPFlowParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60109,7 +64408,7 @@ def _verify_ip_flow_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -60237,7 +64536,7 @@ def begin_verify_ip_flow( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VerificationIPFlowResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -60290,7 +64589,7 @@ def _get_next_hop_initial( parameters: Union[_models.NextHopParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60301,7 +64600,7 @@ def _get_next_hop_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -60429,7 +64728,7 @@ def begin_get_next_hop( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NextHopResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -60482,7 +64781,7 @@ def _get_vm_security_rules_initial( parameters: Union[_models.SecurityGroupViewParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60493,7 +64792,7 @@ def _get_vm_security_rules_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -60621,7 +64920,7 @@ def begin_get_vm_security_rules( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityGroupViewResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -60674,7 +64973,7 @@ def _get_troubleshooting_initial( parameters: Union[_models.TroubleshootingParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60685,7 +64984,7 @@ def _get_troubleshooting_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -60813,7 +65112,7 @@ def begin_get_troubleshooting( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TroubleshootingResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -60866,7 +65165,7 @@ def _get_troubleshooting_result_initial( parameters: Union[_models.QueryTroubleshootingParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -60877,7 +65176,7 @@ def _get_troubleshooting_result_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61007,7 +65306,7 @@ def begin_get_troubleshooting_result( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TroubleshootingResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -61060,7 +65359,7 @@ def _set_flow_log_configuration_initial( parameters: Union[_models.FlowLogInformation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61071,7 +65370,7 @@ def _set_flow_log_configuration_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61199,7 +65498,7 @@ def begin_set_flow_log_configuration( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLogInformation] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -61252,7 +65551,7 @@ def _get_flow_log_status_initial( parameters: Union[_models.FlowLogStatusParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61263,7 +65562,7 @@ def _get_flow_log_status_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61393,7 +65692,7 @@ def begin_get_flow_log_status( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLogInformation] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -61446,7 +65745,7 @@ def _check_connectivity_initial( parameters: Union[_models.ConnectivityParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61457,7 +65756,7 @@ def _check_connectivity_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61590,7 +65889,7 @@ def begin_check_connectivity( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectivityInformation] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -61643,7 +65942,7 @@ def _get_azure_reachability_report_initial( parameters: Union[_models.AzureReachabilityReportParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61654,7 +65953,7 @@ def _get_azure_reachability_report_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61788,7 +66087,7 @@ def begin_get_azure_reachability_report( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureReachabilityReport] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -61841,7 +66140,7 @@ def _list_available_providers_initial( parameters: Union[_models.AvailableProvidersListParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -61852,7 +66151,7 @@ def _list_available_providers_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -61983,7 +66282,7 @@ def begin_list_available_providers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AvailableProvidersList] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -62036,7 +66335,7 @@ def _get_network_configuration_diagnostic_initial( # pylint: disable=name-too-l parameters: Union[_models.NetworkConfigurationDiagnosticParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62047,7 +66346,7 @@ def _get_network_configuration_diagnostic_initial( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -62191,7 +66490,7 @@ def begin_get_network_configuration_diagnostic( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkConfigurationDiagnosticResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -62265,7 +66564,7 @@ def _create_initial( parameters: Union[_models.PacketCapture, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62276,7 +66575,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -62414,7 +66713,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PacketCaptureResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -62477,7 +66776,7 @@ def get( :rtype: ~azure.mgmt.network.models.PacketCaptureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62488,7 +66787,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureResult] = kwargs.pop("cls", None) _request = build_packet_captures_get_request( @@ -62524,7 +66823,7 @@ def get( def _delete_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62535,7 +66834,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_delete_request( @@ -62592,7 +66891,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -62635,7 +66934,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _stop_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62646,7 +66945,7 @@ def _stop_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_stop_request( @@ -62703,7 +67002,7 @@ def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -62746,7 +67045,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _get_status_initial( self, resource_group_name: str, network_watcher_name: str, packet_capture_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62757,7 +67056,7 @@ def _get_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_packet_captures_get_status_request( @@ -62816,7 +67115,7 @@ def begin_get_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureQueryStatusResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -62877,10 +67176,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PacketCaptureListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62962,7 +67261,7 @@ def _create_or_update_initial( migrate: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -62973,7 +67272,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -63130,7 +67429,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -63195,7 +67494,7 @@ def get( :rtype: ~azure.mgmt.network.models.ConnectionMonitorResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63206,7 +67505,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) _request = build_connection_monitors_get_request( @@ -63242,7 +67541,7 @@ def get( def _delete_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63253,7 +67552,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_delete_request( @@ -63311,7 +67610,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63433,7 +67732,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ConnectionMonitorResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63444,7 +67743,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionMonitorResult] = kwargs.pop("cls", None) @@ -63492,7 +67791,7 @@ def update_tags( def _stop_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63503,7 +67802,7 @@ def _stop_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_stop_request( @@ -63561,7 +67860,7 @@ def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63604,7 +67903,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63615,7 +67914,7 @@ def _start_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_start_request( @@ -63673,7 +67972,7 @@ def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63716,7 +68015,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _query_initial( self, resource_group_name: str, network_watcher_name: str, connection_monitor_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63727,7 +68026,7 @@ def _query_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_connection_monitors_query_request( @@ -63786,7 +68085,7 @@ def begin_query( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorQueryResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -63849,10 +68148,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionMonitorListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63932,7 +68231,7 @@ def _create_or_update_initial( parameters: Union[_models.FlowLog, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -63943,7 +68242,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -64078,7 +68377,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -64207,7 +68506,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.FlowLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64218,7 +68517,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) @@ -64279,7 +68578,7 @@ def get( :rtype: ~azure.mgmt.network.models.FlowLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64290,7 +68589,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FlowLog] = kwargs.pop("cls", None) _request = build_flow_logs_get_request( @@ -64326,7 +68625,7 @@ def get( def _delete_initial( self, resource_group_name: str, network_watcher_name: str, flow_log_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64337,7 +68636,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_flow_logs_delete_request( @@ -64394,7 +68693,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -64450,10 +68749,10 @@ def list(self, resource_group_name: str, network_watcher_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.FlowLogListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64536,10 +68835,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64608,7 +68907,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, private_endpoint_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64619,7 +68918,7 @@ def _delete_initial(self, resource_group_name: str, private_endpoint_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_private_endpoints_delete_request( @@ -64671,7 +68970,7 @@ def begin_delete(self, resource_group_name: str, private_endpoint_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -64726,7 +69025,7 @@ def get( :rtype: ~azure.mgmt.network.models.PrivateEndpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64737,7 +69036,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpoint] = kwargs.pop("cls", None) _request = build_private_endpoints_get_request( @@ -64777,7 +69076,7 @@ def _create_or_update_initial( parameters: Union[_models.PrivateEndpoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -64788,7 +69087,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -64918,7 +69217,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpoint] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -64977,10 +69276,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Pri _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65042,10 +69341,10 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.PrivateEndpoi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65130,10 +69429,10 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.AvailablePriva _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailablePrivateEndpointTypesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65202,10 +69501,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AvailablePrivateEndpointTypesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65279,7 +69578,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, private_endpoint_name: str, private_dns_zone_group_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65290,7 +69589,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_private_dns_zone_groups_delete_request( @@ -65346,7 +69645,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -65402,7 +69701,7 @@ def get( :rtype: ~azure.mgmt.network.models.PrivateDnsZoneGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65413,7 +69712,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateDnsZoneGroup] = kwargs.pop("cls", None) _request = build_private_dns_zone_groups_get_request( @@ -65453,7 +69752,7 @@ def _create_or_update_initial( parameters: Union[_models.PrivateDnsZoneGroup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65464,7 +69763,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -65603,7 +69902,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateDnsZoneGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -65667,10 +69966,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateDnsZoneGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65743,7 +70042,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65754,7 +70053,7 @@ def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_private_link_services_delete_request( @@ -65806,7 +70105,7 @@ def begin_delete(self, resource_group_name: str, service_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -65861,7 +70160,7 @@ def get( :rtype: ~azure.mgmt.network.models.PrivateLinkService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65872,7 +70171,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkService] = kwargs.pop("cls", None) _request = build_private_link_services_get_request( @@ -65912,7 +70211,7 @@ def _create_or_update_initial( parameters: Union[_models.PrivateLinkService, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -65923,7 +70222,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -66053,7 +70352,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkService] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -66112,10 +70411,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Pri _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66177,10 +70476,10 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.PrivateLinkSe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateLinkServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66255,7 +70554,7 @@ def get_private_endpoint_connection( :rtype: ~azure.mgmt.network.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66266,7 +70565,7 @@ def get_private_endpoint_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) _request = build_private_link_services_get_private_endpoint_connection_request( @@ -66384,7 +70683,7 @@ def update_private_endpoint_connection( :rtype: ~azure.mgmt.network.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66395,7 +70694,7 @@ def update_private_endpoint_connection( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -66443,7 +70742,7 @@ def update_private_endpoint_connection( def _delete_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, service_name: str, pe_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66454,7 +70753,7 @@ def _delete_private_endpoint_connection_initial( # pylint: disable=name-too-lon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_private_link_services_delete_private_endpoint_connection_request( @@ -66511,7 +70810,7 @@ def begin_delete_private_endpoint_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -66569,10 +70868,10 @@ def list_private_endpoint_connections( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66630,7 +70929,7 @@ def _check_private_link_service_visibility_initial( # pylint: disable=name-too- parameters: Union[_models.CheckPrivateLinkServiceVisibilityRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66641,7 +70940,7 @@ def _check_private_link_service_visibility_initial( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -66754,7 +71053,7 @@ def begin_check_private_link_service_visibility( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkServiceVisibility] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -66806,7 +71105,7 @@ def _check_private_link_service_visibility_by_resource_group_initial( # pylint: parameters: Union[_models.CheckPrivateLinkServiceVisibilityRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -66817,7 +71116,7 @@ def _check_private_link_service_visibility_by_resource_group_initial( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -66948,7 +71247,7 @@ def begin_check_private_link_service_visibility_by_resource_group( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkServiceVisibility] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -67011,10 +71310,10 @@ def list_auto_approved_private_link_services( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AutoApprovedPrivateLinkServicesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67083,10 +71382,10 @@ def list_auto_approved_private_link_services_by_resource_group( # pylint: disab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.AutoApprovedPrivateLinkServicesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67160,7 +71459,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, public_ip_prefix_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67171,7 +71470,7 @@ def _delete_initial(self, resource_group_name: str, public_ip_prefix_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_public_ip_prefixes_delete_request( @@ -67222,7 +71521,7 @@ def begin_delete(self, resource_group_name: str, public_ip_prefix_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -67277,7 +71576,7 @@ def get( :rtype: ~azure.mgmt.network.models.PublicIPPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67288,7 +71587,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) _request = build_public_ip_prefixes_get_request( @@ -67327,7 +71626,7 @@ def _create_or_update_initial( parameters: Union[_models.PublicIPPrefix, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67338,7 +71637,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -67467,7 +71766,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -67586,7 +71885,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.PublicIPPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67597,7 +71896,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PublicIPPrefix] = kwargs.pop("cls", None) @@ -67651,10 +71950,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.PublicIPPrefix"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67716,10 +72015,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Pub _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.PublicIPPrefixListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67790,7 +72089,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, route_filter_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67801,7 +72100,7 @@ def _delete_initial(self, resource_group_name: str, route_filter_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_route_filters_delete_request( @@ -67859,7 +72158,7 @@ def begin_delete(self, resource_group_name: str, route_filter_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -67914,7 +72213,7 @@ def get( :rtype: ~azure.mgmt.network.models.RouteFilter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67925,7 +72224,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) _request = build_route_filters_get_request( @@ -67964,7 +72263,7 @@ def _create_or_update_initial( route_filter_parameters: Union[_models.RouteFilter, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67975,7 +72274,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -68104,7 +72403,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -68223,7 +72522,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.RouteFilter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68234,7 +72533,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilter] = kwargs.pop("cls", None) @@ -68290,10 +72589,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68354,10 +72653,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.RouteFilter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68429,7 +72728,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, route_filter_name: str, rule_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68440,7 +72739,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_route_filter_rules_delete_request( @@ -68503,7 +72802,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -68559,7 +72858,7 @@ def get( :rtype: ~azure.mgmt.network.models.RouteFilterRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68570,7 +72869,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterRule] = kwargs.pop("cls", None) _request = build_route_filter_rules_get_request( @@ -68610,7 +72909,7 @@ def _create_or_update_initial( route_filter_rule_parameters: Union[_models.RouteFilterRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68621,7 +72920,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -68760,7 +73059,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteFilterRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -68824,10 +73123,10 @@ def list_by_route_filter( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteFilterRuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68899,7 +73198,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, route_table_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -68910,7 +73209,7 @@ def _delete_initial(self, resource_group_name: str, route_table_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_route_tables_delete_request( @@ -68961,7 +73260,7 @@ def begin_delete(self, resource_group_name: str, route_table_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -69016,7 +73315,7 @@ def get( :rtype: ~azure.mgmt.network.models.RouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69027,7 +73326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) _request = build_route_tables_get_request( @@ -69066,7 +73365,7 @@ def _create_or_update_initial( parameters: Union[_models.RouteTable, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69077,7 +73376,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -69201,7 +73500,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -69320,7 +73619,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.RouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69331,7 +73630,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteTable] = kwargs.pop("cls", None) @@ -69387,10 +73686,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Rou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTableListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69451,10 +73750,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RouteTable"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteTableListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69526,7 +73825,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, route_table_name: str, route_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69537,7 +73836,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_routes_delete_request( @@ -69593,7 +73892,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -69647,7 +73946,7 @@ def get(self, resource_group_name: str, route_table_name: str, route_name: str, :rtype: ~azure.mgmt.network.models.Route :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69658,7 +73957,7 @@ def get(self, resource_group_name: str, route_table_name: str, route_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.Route] = kwargs.pop("cls", None) _request = build_routes_get_request( @@ -69698,7 +73997,7 @@ def _create_or_update_initial( route_parameters: Union[_models.Route, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69709,7 +74008,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -69843,7 +74142,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Route] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -69905,10 +74204,10 @@ def list(self, resource_group_name: str, route_table_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69982,7 +74281,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, security_partner_provider_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69993,7 +74292,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_security_partner_providers_delete_request( @@ -70046,7 +74345,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -70099,7 +74398,7 @@ def get( :rtype: ~azure.mgmt.network.models.SecurityPartnerProvider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70110,7 +74409,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) _request = build_security_partner_providers_get_request( @@ -70148,7 +74447,7 @@ def _create_or_update_initial( parameters: Union[_models.SecurityPartnerProvider, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70159,7 +74458,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -70288,7 +74587,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -70407,7 +74706,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.SecurityPartnerProvider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70418,7 +74717,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SecurityPartnerProvider] = kwargs.pop("cls", None) @@ -70477,10 +74776,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70542,10 +74841,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.SecurityPartnerProvider"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SecurityPartnerProviderListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70625,10 +74924,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.BgpServiceCommunity"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpServiceCommunityListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70700,7 +74999,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, service_endpoint_policy_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70711,7 +75010,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_service_endpoint_policies_delete_request( @@ -70764,7 +75063,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -70824,7 +75123,7 @@ def get( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70835,7 +75134,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) _request = build_service_endpoint_policies_get_request( @@ -70874,7 +75173,7 @@ def _create_or_update_initial( parameters: Union[_models.ServiceEndpointPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70885,7 +75184,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -71014,7 +75313,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -71133,7 +75432,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71144,7 +75443,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicy] = kwargs.pop("cls", None) @@ -71199,10 +75498,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.ServiceEndpointPolicy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71267,10 +75566,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71347,7 +75646,7 @@ def _delete_initial( service_endpoint_policy_definition_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71358,7 +75657,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_service_endpoint_policy_definitions_delete_request( @@ -71419,7 +75718,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -71480,7 +75779,7 @@ def get( :rtype: ~azure.mgmt.network.models.ServiceEndpointPolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71491,7 +75790,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyDefinition] = kwargs.pop("cls", None) _request = build_service_endpoint_policy_definitions_get_request( @@ -71531,7 +75830,7 @@ def _create_or_update_initial( service_endpoint_policy_definitions: Union[_models.ServiceEndpointPolicyDefinition, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71542,7 +75841,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -71693,7 +75992,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceEndpointPolicyDefinition] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -71759,10 +76058,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceEndpointPolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71845,7 +76144,7 @@ def list(self, location: str, **kwargs: Any) -> _models.ServiceTagsListResult: :rtype: ~azure.mgmt.network.models.ServiceTagsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -71856,7 +76155,7 @@ def list(self, location: str, **kwargs: Any) -> _models.ServiceTagsListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceTagsListResult] = kwargs.pop("cls", None) _request = build_service_tags_list_request( @@ -71934,10 +76233,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceTagInformationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72022,10 +76321,10 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72096,7 +76395,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, virtual_network_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72107,7 +76406,7 @@ def _delete_initial(self, resource_group_name: str, virtual_network_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_networks_delete_request( @@ -72158,7 +76457,7 @@ def begin_delete(self, resource_group_name: str, virtual_network_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -72213,7 +76512,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72224,7 +76523,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) _request = build_virtual_networks_get_request( @@ -72263,7 +76562,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualNetwork, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72274,7 +76573,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -72403,7 +76702,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -72522,7 +76821,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VirtualNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72533,7 +76832,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetwork] = kwargs.pop("cls", None) @@ -72587,10 +76886,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualNetwork"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72652,10 +76951,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72721,7 +77020,7 @@ def check_ip_address_availability( :rtype: ~azure.mgmt.network.models.IPAddressAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72732,7 +77031,7 @@ def check_ip_address_availability( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.IPAddressAvailabilityResult] = kwargs.pop("cls", None) _request = build_virtual_networks_check_ip_address_availability_request( @@ -72781,10 +77080,10 @@ def list_usage( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkListUsageResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72844,7 +77143,7 @@ def _list_ddos_protection_status_initial( skip_token: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72855,7 +77154,7 @@ def _list_ddos_protection_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_networks_list_ddos_protection_status_request( @@ -72903,6 +77202,7 @@ def begin_list_ddos_protection_status( skip_token: Optional[str] = None, **kwargs: Any ) -> LROPoller[Iterable["_models.PublicIpDdosProtectionStatusResult"]]: + # pylint: disable=line-too-long """Gets the Ddos Protection Status of all IP Addresses under the Virtual Network. :param resource_group_name: The name of the resource group. Required. @@ -72923,10 +77223,10 @@ def begin_list_ddos_protection_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkDdosProtectionStatusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73047,7 +77347,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, virtual_network_name: str, subnet_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73058,7 +77358,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_subnets_delete_request( @@ -73114,7 +77414,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -73178,7 +77478,7 @@ def get( :rtype: ~azure.mgmt.network.models.Subnet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73189,7 +77489,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.Subnet] = kwargs.pop("cls", None) _request = build_subnets_get_request( @@ -73230,7 +77530,7 @@ def _create_or_update_initial( subnet_parameters: Union[_models.Subnet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73241,7 +77541,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -73377,7 +77677,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Subnet] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -73432,7 +77732,7 @@ def _prepare_network_policies_initial( prepare_network_policies_request_parameters: Union[_models.PrepareNetworkPoliciesRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73443,7 +77743,7 @@ def _prepare_network_policies_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -73582,7 +77882,7 @@ def begin_prepare_network_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -73633,7 +77933,7 @@ def _unprepare_network_policies_initial( unprepare_network_policies_request_parameters: Union[_models.UnprepareNetworkPoliciesRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73644,7 +77944,7 @@ def _unprepare_network_policies_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -73785,7 +78085,7 @@ def begin_unprepare_network_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -73843,10 +78143,10 @@ def list(self, resource_group_name: str, virtual_network_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.SubnetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73933,7 +78233,7 @@ def list( :rtype: ~azure.mgmt.network.models.ResourceNavigationLinksListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -73944,7 +78244,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ResourceNavigationLinksListResult] = kwargs.pop("cls", None) _request = build_resource_navigation_links_list_request( @@ -74012,7 +78312,7 @@ def list( :rtype: ~azure.mgmt.network.models.ServiceAssociationLinksListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74023,7 +78323,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ServiceAssociationLinksListResult] = kwargs.pop("cls", None) _request = build_service_association_links_list_request( @@ -74078,7 +78378,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, virtual_network_name: str, virtual_network_peering_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74089,7 +78389,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_peerings_delete_request( @@ -74145,7 +78445,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -74201,7 +78501,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74212,7 +78512,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkPeering] = kwargs.pop("cls", None) _request = build_virtual_network_peerings_get_request( @@ -74254,7 +78554,7 @@ def _create_or_update_initial( sync_remote_address_space: Optional[Union[str, _models.SyncRemoteAddressSpace]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74265,7 +78565,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -74420,7 +78720,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkPeering] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -74486,10 +78786,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74567,7 +78867,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualNetworkGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74578,7 +78878,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -74707,7 +79007,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -74767,7 +79067,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74778,7 +79078,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_request( @@ -74812,7 +79112,7 @@ def get( def _delete_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74823,7 +79123,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_delete_request( @@ -74876,7 +79176,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -74922,7 +79222,7 @@ def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -74933,7 +79233,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -75060,7 +79360,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -75120,10 +79420,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75192,10 +79492,10 @@ def list_connections( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayListConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75254,7 +79554,7 @@ def _reset_initial( gateway_vip: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75265,7 +79565,7 @@ def _reset_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_reset_request( @@ -75328,7 +79628,7 @@ def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -75375,7 +79675,7 @@ def get_long_running_output(pipeline_response): def _reset_vpn_client_shared_key_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75386,7 +79686,7 @@ def _reset_vpn_client_shared_key_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_reset_vpn_client_shared_key_request( @@ -75440,7 +79740,7 @@ def begin_reset_vpn_client_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -75486,7 +79786,7 @@ def _generatevpnclientpackage_initial( parameters: Union[_models.VpnClientParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75497,7 +79797,7 @@ def _generatevpnclientpackage_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -75626,7 +79926,7 @@ def begin_generatevpnclientpackage( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -75677,7 +79977,7 @@ def _generate_vpn_profile_initial( parameters: Union[_models.VpnClientParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75688,7 +79988,7 @@ def _generate_vpn_profile_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -75817,7 +80117,7 @@ def begin_generate_vpn_profile( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -75864,7 +80164,7 @@ def get_long_running_output(pipeline_response): def _get_vpn_profile_package_url_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75875,7 +80175,7 @@ def _get_vpn_profile_package_url_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpn_profile_package_url_request( @@ -75929,7 +80229,7 @@ def begin_get_vpn_profile_package_url( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -75973,7 +80273,7 @@ def get_long_running_output(pipeline_response): def _get_bgp_peer_status_initial( self, resource_group_name: str, virtual_network_gateway_name: str, *, peer: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -75984,7 +80284,7 @@ def _get_bgp_peer_status_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_bgp_peer_status_request( @@ -76041,7 +80341,7 @@ def begin_get_bgp_peer_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpPeerStatusListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -76097,7 +80397,7 @@ def supported_vpn_devices(self, resource_group_name: str, virtual_network_gatewa :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76108,7 +80408,7 @@ def supported_vpn_devices(self, resource_group_name: str, virtual_network_gatewa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_supported_vpn_devices_request( @@ -76142,7 +80442,7 @@ def supported_vpn_devices(self, resource_group_name: str, virtual_network_gatewa def _get_learned_routes_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76153,7 +80453,7 @@ def _get_learned_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_learned_routes_request( @@ -76208,7 +80508,7 @@ def begin_get_learned_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.GatewayRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -76254,7 +80554,7 @@ def get_long_running_output(pipeline_response): def _get_advertised_routes_initial( self, resource_group_name: str, virtual_network_gateway_name: str, *, peer: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76265,7 +80565,7 @@ def _get_advertised_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_advertised_routes_request( @@ -76323,7 +80623,7 @@ def begin_get_advertised_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.GatewayRouteListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -76374,7 +80674,7 @@ def _set_vpnclient_ipsec_parameters_initial( vpnclient_ipsec_params: Union[_models.VpnClientIPsecParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76385,7 +80685,7 @@ def _set_vpnclient_ipsec_parameters_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -76518,7 +80818,7 @@ def begin_set_vpnclient_ipsec_parameters( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnClientIPsecParameters] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -76567,7 +80867,7 @@ def get_long_running_output(pipeline_response): def _get_vpnclient_ipsec_parameters_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76578,7 +80878,7 @@ def _get_vpnclient_ipsec_parameters_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request( @@ -76634,7 +80934,7 @@ def begin_get_vpnclient_ipsec_parameters( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnClientIPsecParameters] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -76753,7 +81053,7 @@ def vpn_device_configuration_script( :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76764,7 +81064,7 @@ def vpn_device_configuration_script( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) @@ -76814,7 +81114,7 @@ def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76825,7 +81125,7 @@ def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -76956,7 +81256,7 @@ def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -77007,7 +81307,7 @@ def _stop_packet_capture_initial( parameters: Union[_models.VpnPacketCaptureStopParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77018,7 +81318,7 @@ def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -77146,7 +81446,7 @@ def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -77190,10 +81490,594 @@ def get_long_running_output(pipeline_response): ) return LROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _get_failover_all_test_details_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + type: str, + fetch_latest: bool, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_get_failover_all_test_details_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + type=type, + fetch_latest=fetch_latest, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_get_failover_all_test_details( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + type: str, + fetch_latest: bool, + **kwargs: Any + ) -> LROPoller[List[_models.ExpressRouteFailoverTestDetails]]: + """This operation retrieves the details of all the failover tests performed on the gateway for + different peering locations. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword type: The type of failover test. Required. + :paramtype type: str + :keyword fetch_latest: Fetch only the latest tests for each peering location. Required. + :paramtype fetch_latest: bool + :return: An instance of LROPoller that returns either list of ExpressRouteFailoverTestDetails + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.network.models.ExpressRouteFailoverTestDetails]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[List[_models.ExpressRouteFailoverTestDetails]] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_failover_all_test_details_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + type=type, + fetch_latest=fetch_latest, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ExpressRouteFailoverTestDetails]", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[List[_models.ExpressRouteFailoverTestDetails]].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[List[_models.ExpressRouteFailoverTestDetails]]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _get_failover_single_test_details_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + peering_location: str, + failover_test_id: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_get_failover_single_test_details_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + peering_location=peering_location, + failover_test_id=failover_test_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_get_failover_single_test_details( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + peering_location: str, + failover_test_id: str, + **kwargs: Any + ) -> LROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]]: + """This operation retrieves the details of a particular failover test performed on the gateway + based on the test Guid. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword peering_location: Peering location of the test. Required. + :paramtype peering_location: str + :keyword failover_test_id: The unique Guid value which identifies the test. Required. + :paramtype failover_test_id: str + :return: An instance of LROPoller that returns either list of + ExpressRouteFailoverSingleTestDetails or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.network.models.ExpressRouteFailoverSingleTestDetails]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[List[_models.ExpressRouteFailoverSingleTestDetails]] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_failover_single_test_details_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peering_location=peering_location, + failover_test_id=failover_test_id, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ExpressRouteFailoverSingleTestDetails]", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[List[_models.ExpressRouteFailoverSingleTestDetails]]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _start_express_route_site_failover_simulation_initial( # pylint: disable=name-too-long + self, resource_group_name: str, virtual_network_gateway_name: str, *, peering_location: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_virtual_network_gateways_start_express_route_site_failover_simulation_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + peering_location=peering_location, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_start_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, resource_group_name: str, virtual_network_gateway_name: str, *, peering_location: str, **kwargs: Any + ) -> LROPoller[str]: + """This operation starts failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :keyword peering_location: Peering location of the test. Required. + :paramtype peering_location: str + :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: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + cls: ClsType[str] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._start_express_route_site_failover_simulation_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peering_location=peering_location, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("str", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[str].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _stop_express_route_site_failover_simulation_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: Union[_models.ExpressRouteFailoverStopApiParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(stop_parameters, (IOBase, bytes)): + _content = stop_parameters + else: + _json = self._serialize.body(stop_parameters, "ExpressRouteFailoverStopApiParameters") + + _request = build_virtual_network_gateways_stop_express_route_site_failover_simulation_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, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: _models.ExpressRouteFailoverStopApiParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Required. + :type stop_parameters: ~azure.mgmt.network.models.ExpressRouteFailoverStopApiParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @overload + def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Required. + :type stop_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :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: + """ + + @distributed_trace + def begin_stop_express_route_site_failover_simulation( # pylint: disable=name-too-long + self, + resource_group_name: str, + virtual_network_gateway_name: str, + stop_parameters: Union[_models.ExpressRouteFailoverStopApiParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[str]: + """This operation stops failover simulation on the gateway for the specified peering location. + + :param resource_group_name: The name of the resource group. Required. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. Required. + :type virtual_network_gateway_name: str + :param stop_parameters: Virtual network gateway stop simulation parameters supplied to stop + failover simulation on gateway. Is either a ExpressRouteFailoverStopApiParameters type or a + IO[bytes] type. Required. + :type stop_parameters: ~azure.mgmt.network.models.ExpressRouteFailoverStopApiParameters or + IO[bytes] + :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: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[str] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._stop_express_route_site_failover_simulation_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + stop_parameters=stop_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("str", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[str].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[str](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _get_vpnclient_connection_health_initial( self, resource_group_name: str, virtual_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77204,7 +82088,7 @@ def _get_vpnclient_connection_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateways_get_vpnclient_connection_health_request( @@ -77260,7 +82144,7 @@ def begin_get_vpnclient_connection_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnClientConnectionHealthDetailListResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -77312,7 +82196,7 @@ def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint: disa request: Union[_models.P2SVpnConnectionRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77323,7 +82207,7 @@ def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -77447,7 +82331,7 @@ def begin_disconnect_virtual_network_gateway_vpn_connections( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -77516,7 +82400,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualNetworkGatewayConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77527,7 +82411,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -77663,7 +82547,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -77724,7 +82608,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGatewayConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77735,7 +82619,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_request( @@ -77769,7 +82653,7 @@ def get( def _delete_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77780,7 +82664,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_delete_request( @@ -77834,7 +82718,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -77880,7 +82764,7 @@ def _update_tags_initial( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -77891,7 +82775,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -78026,7 +82910,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -78079,7 +82963,7 @@ def _set_shared_key_initial( parameters: Union[_models.ConnectionSharedKey, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78090,7 +82974,7 @@ def _set_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -78229,7 +83113,7 @@ def begin_set_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionSharedKey] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -78291,7 +83175,7 @@ def get_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKey :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78302,7 +83186,7 @@ def get_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKey] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_shared_key_request( @@ -78349,10 +83233,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78409,7 +83293,7 @@ def _reset_shared_key_initial( parameters: Union[_models.ConnectionResetSharedKey, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78420,7 +83304,7 @@ def _reset_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -78559,7 +83443,7 @@ def begin_reset_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionResetSharedKey] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -78612,7 +83496,7 @@ def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78623,7 +83507,7 @@ def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -78757,7 +83641,7 @@ def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -78808,7 +83692,7 @@ def _stop_packet_capture_initial( parameters: Union[_models.VpnPacketCaptureStopParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78819,7 +83703,7 @@ def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -78950,7 +83834,7 @@ def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -78997,7 +83881,7 @@ def get_long_running_output(pipeline_response): def _get_ike_sas_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79008,7 +83892,7 @@ def _get_ike_sas_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_get_ike_sas_request( @@ -79064,7 +83948,7 @@ def begin_get_ike_sas( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -79108,7 +83992,7 @@ def get_long_running_output(pipeline_response): def _reset_connection_initial( self, resource_group_name: str, virtual_network_gateway_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79119,7 +84003,7 @@ def _reset_connection_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_connections_reset_connection_request( @@ -79174,7 +84058,7 @@ def begin_reset_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -79240,7 +84124,7 @@ def _create_or_update_initial( parameters: Union[_models.LocalNetworkGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79251,7 +84135,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -79380,7 +84264,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -79440,7 +84324,7 @@ def get( :rtype: ~azure.mgmt.network.models.LocalNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79451,7 +84335,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) _request = build_local_network_gateways_get_request( @@ -79485,7 +84369,7 @@ def get( def _delete_initial( self, resource_group_name: str, local_network_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79496,7 +84380,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_local_network_gateways_delete_request( @@ -79547,7 +84431,7 @@ def begin_delete(self, resource_group_name: str, local_network_gateway_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -79659,7 +84543,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.LocalNetworkGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79670,7 +84554,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LocalNetworkGateway] = kwargs.pop("cls", None) @@ -79726,10 +84610,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Loc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.LocalNetworkGatewayListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79815,7 +84699,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualNetworkGatewayNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79826,7 +84710,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkGatewayNatRule] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_nat_rules_get_request( @@ -79866,7 +84750,7 @@ def _create_or_update_initial( nat_rule_parameters: Union[_models.VirtualNetworkGatewayNatRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79877,7 +84761,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -80017,7 +84901,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkGatewayNatRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -80067,7 +84951,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_network_gateway_name: str, nat_rule_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80078,7 +84962,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_gateway_nat_rules_delete_request( @@ -80134,7 +85018,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -80192,10 +85076,10 @@ def list_by_virtual_network_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualNetworkGatewayNatRulesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80267,7 +85151,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80278,7 +85162,7 @@ def _delete_initial(self, resource_group_name: str, tap_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_network_taps_delete_request( @@ -80329,7 +85213,7 @@ def begin_delete(self, resource_group_name: str, tap_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -80380,7 +85264,7 @@ def get(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.network.models.VirtualNetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80391,7 +85275,7 @@ def get(self, resource_group_name: str, tap_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) _request = build_virtual_network_taps_get_request( @@ -80429,7 +85313,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualNetworkTap, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80440,7 +85324,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -80569,7 +85453,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -80688,7 +85572,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VirtualNetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80699,7 +85583,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualNetworkTap] = kwargs.pop("cls", None) @@ -80753,10 +85637,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualNetworkTap"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTapListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80818,10 +85702,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualNetworkTapListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80892,7 +85776,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, resource_group_name: str, virtual_router_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80903,7 +85787,7 @@ def _delete_initial(self, resource_group_name: str, virtual_router_name: str, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_routers_delete_request( @@ -80955,7 +85839,7 @@ def begin_delete(self, resource_group_name: str, virtual_router_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -81010,7 +85894,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualRouter :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81021,7 +85905,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouter] = kwargs.pop("cls", None) _request = build_virtual_routers_get_request( @@ -81061,7 +85945,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualRouter, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81072,7 +85956,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -81200,7 +86084,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualRouter] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -81259,10 +86143,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81324,10 +86208,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VirtualRouter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81400,7 +86284,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, resource_group_name: str, virtual_router_name: str, peering_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81411,7 +86295,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_router_peerings_delete_request( @@ -81468,7 +86352,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -81524,7 +86408,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualRouterPeering :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81535,7 +86419,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterPeering] = kwargs.pop("cls", None) _request = build_virtual_router_peerings_get_request( @@ -81576,7 +86460,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualRouterPeering, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81587,7 +86471,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -81727,7 +86611,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualRouterPeering] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -81792,10 +86676,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualRouterPeeringListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81879,7 +86763,7 @@ def get(self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.network.models.VirtualWAN :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81890,7 +86774,7 @@ def get(self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) _request = build_virtual_wans_get_request( @@ -81928,7 +86812,7 @@ def _create_or_update_initial( wan_parameters: Union[_models.VirtualWAN, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81939,7 +86823,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -82063,7 +86947,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -82182,7 +87066,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VirtualWAN :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82193,7 +87077,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualWAN] = kwargs.pop("cls", None) @@ -82237,7 +87121,7 @@ def update_tags( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82248,7 +87132,7 @@ def _delete_initial(self, resource_group_name: str, virtual_wan_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_wans_delete_request( @@ -82299,7 +87183,7 @@ def begin_delete(self, resource_group_name: str, virtual_wan_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -82351,10 +87235,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualWANsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82415,10 +87299,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VirtualWAN"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualWANsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82499,7 +87383,7 @@ def get(self, resource_group_name: str, vpn_site_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.network.models.VpnSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82510,7 +87394,7 @@ def get(self, resource_group_name: str, vpn_site_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) _request = build_vpn_sites_get_request( @@ -82548,7 +87432,7 @@ def _create_or_update_initial( vpn_site_parameters: Union[_models.VpnSite, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82559,7 +87443,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -82683,7 +87567,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -82802,7 +87686,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VpnSite :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82813,7 +87697,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnSite] = kwargs.pop("cls", None) @@ -82857,7 +87741,7 @@ def update_tags( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, vpn_site_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82868,7 +87752,7 @@ def _delete_initial(self, resource_group_name: str, vpn_site_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_sites_delete_request( @@ -82919,7 +87803,7 @@ def begin_delete(self, resource_group_name: str, vpn_site_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -82971,10 +87855,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSitesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83035,10 +87919,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VpnSite"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSitesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83123,7 +88007,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnSiteLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83134,7 +88018,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSiteLink] = kwargs.pop("cls", None) _request = build_vpn_site_links_get_request( @@ -83183,10 +88067,10 @@ def list_by_vpn_site( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSiteLinksResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83264,7 +88148,7 @@ def _download_initial( request: Union[_models.GetVpnSitesConfigurationRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83275,7 +88159,7 @@ def _download_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -83402,7 +88286,7 @@ def begin_download( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -83479,7 +88363,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnServerConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83490,7 +88374,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_get_request( @@ -83528,7 +88412,7 @@ def _create_or_update_initial( vpn_server_configuration_parameters: Union[_models.VpnServerConfiguration, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83539,7 +88423,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -83675,7 +88559,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -83799,7 +88683,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VpnServerConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83810,7 +88694,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfiguration] = kwargs.pop("cls", None) @@ -83856,7 +88740,7 @@ def update_tags( def _delete_initial( self, resource_group_name: str, vpn_server_configuration_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83867,7 +88751,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_delete_request( @@ -83921,7 +88805,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -83976,10 +88860,10 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84041,10 +88925,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VpnServerConfiguration"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84121,7 +89005,7 @@ def _create_or_update_initial( vpn_server_configuration_policy_group_parameters: Union[_models.VpnServerConfigurationPolicyGroup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84132,7 +89016,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -84279,7 +89163,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnServerConfigurationPolicyGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -84333,7 +89217,7 @@ def _delete_initial( configuration_policy_group_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84344,7 +89228,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_configuration_policy_groups_delete_request( @@ -84404,7 +89288,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -84465,7 +89349,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnServerConfigurationPolicyGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84476,7 +89360,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfigurationPolicyGroup] = kwargs.pop("cls", None) _request = build_configuration_policy_groups_get_request( @@ -84527,10 +89411,10 @@ def list_by_vpn_server_configuration( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnServerConfigurationPolicyGroupsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84613,7 +89497,7 @@ def get(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.network.models.VirtualHub :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84624,7 +89508,7 @@ def get(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) _request = build_virtual_hubs_get_request( @@ -84662,7 +89546,7 @@ def _create_or_update_initial( virtual_hub_parameters: Union[_models.VirtualHub, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84673,7 +89557,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -84797,7 +89681,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -84916,7 +89800,7 @@ def update_tags( :rtype: ~azure.mgmt.network.models.VirtualHub :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84927,7 +89811,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHub] = kwargs.pop("cls", None) @@ -84971,7 +89855,7 @@ def update_tags( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84982,7 +89866,7 @@ def _delete_initial(self, resource_group_name: str, virtual_hub_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hubs_delete_request( @@ -85033,7 +89917,7 @@ def begin_delete(self, resource_group_name: str, virtual_hub_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -85085,10 +89969,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85149,10 +90033,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VirtualHub"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85208,7 +90092,7 @@ def _get_effective_virtual_hub_routes_initial( # pylint: disable=name-too-long effective_routes_parameters: Optional[Union[_models.EffectiveRoutesParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85219,7 +90103,7 @@ def _get_effective_virtual_hub_routes_initial( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -85353,7 +90237,7 @@ def begin_get_effective_virtual_hub_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHubEffectiveRouteList] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -85406,7 +90290,7 @@ def _get_inbound_routes_initial( get_inbound_routes_parameters: Union[_models.GetInboundRoutesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85417,7 +90301,7 @@ def _get_inbound_routes_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -85547,7 +90431,7 @@ def begin_get_inbound_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EffectiveRouteMapRouteList] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -85600,7 +90484,7 @@ def _get_outbound_routes_initial( get_outbound_routes_parameters: Union[_models.GetOutboundRoutesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85611,7 +90495,7 @@ def _get_outbound_routes_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -85742,7 +90626,7 @@ def begin_get_outbound_routes( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EffectiveRouteMapRouteList] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -85824,7 +90708,7 @@ def get( :rtype: ~azure.mgmt.network.models.RouteMap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85835,7 +90719,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RouteMap] = kwargs.pop("cls", None) _request = build_route_maps_get_request( @@ -85875,7 +90759,7 @@ def _create_or_update_initial( route_map_parameters: Union[_models.RouteMap, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85886,7 +90770,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -86020,7 +90904,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RouteMap] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -86070,7 +90954,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_map_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86081,7 +90965,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_route_maps_delete_request( @@ -86137,7 +91021,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -86193,10 +91077,10 @@ def list(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListRouteMapsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86275,7 +91159,7 @@ def _create_or_update_initial( hub_virtual_network_connection_parameters: Union[_models.HubVirtualNetworkConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86286,7 +91170,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -86431,7 +91315,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubVirtualNetworkConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -86481,7 +91365,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86492,7 +91376,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_hub_virtual_network_connections_delete_request( @@ -86548,7 +91432,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -86604,7 +91488,7 @@ def get( :rtype: ~azure.mgmt.network.models.HubVirtualNetworkConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86615,7 +91499,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubVirtualNetworkConnection] = kwargs.pop("cls", None) _request = build_hub_virtual_network_connections_get_request( @@ -86665,10 +91549,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListHubVirtualNetworkConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86751,7 +91635,7 @@ def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.network.models.VpnGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86762,7 +91646,7 @@ def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) _request = build_vpn_gateways_get_request( @@ -86800,7 +91684,7 @@ def _create_or_update_initial( vpn_gateway_parameters: Union[_models.VpnGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86811,7 +91695,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -86937,7 +91821,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -86990,7 +91874,7 @@ def _update_tags_initial( vpn_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87001,7 +91885,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -87127,7 +92011,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -87174,7 +92058,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87185,7 +92069,7 @@ def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_gateways_delete_request( @@ -87236,7 +92120,7 @@ def begin_delete(self, resource_group_name: str, gateway_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -87278,7 +92162,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reset_initial( self, resource_group_name: str, gateway_name: str, *, ip_configuration_id: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87289,7 +92173,7 @@ def _reset_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_gateways_reset_request( @@ -87346,7 +92230,7 @@ def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -87397,7 +92281,7 @@ def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnGatewayPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87408,7 +92292,7 @@ def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -87539,7 +92423,7 @@ def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -87590,7 +92474,7 @@ def _stop_packet_capture_initial( parameters: Optional[Union[_models.VpnGatewayPacketCaptureStopParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87601,7 +92485,7 @@ def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -87731,7 +92615,7 @@ def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -87788,10 +92672,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87852,10 +92736,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.VpnGateway"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87932,7 +92816,7 @@ def _reset_connection_initial( link_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87943,7 +92827,7 @@ def _reset_connection_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_link_connections_reset_connection_request( @@ -88008,7 +92892,7 @@ def begin_reset_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -88076,10 +92960,10 @@ def get_all_shared_keys( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResultList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88155,7 +93039,7 @@ def get_default_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKeyResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88166,7 +93050,7 @@ def get_default_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) _request = build_vpn_link_connections_get_default_shared_key_request( @@ -88208,7 +93092,7 @@ def _set_or_init_default_shared_key_initial( connection_shared_key_parameters: Union[_models.ConnectionSharedKeyResult, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88219,7 +93103,7 @@ def _set_or_init_default_shared_key_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -88376,7 +93260,7 @@ def begin_set_or_init_default_shared_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -88447,7 +93331,7 @@ def list_default_shared_key( :rtype: ~azure.mgmt.network.models.ConnectionSharedKeyResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88458,7 +93342,7 @@ def list_default_shared_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ConnectionSharedKeyResult] = kwargs.pop("cls", None) _request = build_vpn_link_connections_list_default_shared_key_request( @@ -88499,7 +93383,7 @@ def _get_ike_sas_initial( link_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88510,7 +93394,7 @@ def _get_ike_sas_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_link_connections_get_ike_sas_request( @@ -88575,7 +93459,7 @@ def begin_get_ike_sas( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -88639,10 +93523,10 @@ def list_by_vpn_connection( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnSiteLinkConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88730,7 +93614,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88741,7 +93625,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnConnection] = kwargs.pop("cls", None) _request = build_vpn_connections_get_request( @@ -88781,7 +93665,7 @@ def _create_or_update_initial( vpn_connection_parameters: Union[_models.VpnConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88792,7 +93676,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -88934,7 +93818,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -88984,7 +93868,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, gateway_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88995,7 +93879,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_connections_delete_request( @@ -89051,7 +93935,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -89099,7 +93983,7 @@ def _start_packet_capture_initial( parameters: Optional[Union[_models.VpnConnectionPacketCaptureStartParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89110,7 +93994,7 @@ def _start_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -89251,7 +94135,7 @@ def begin_start_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -89304,7 +94188,7 @@ def _stop_packet_capture_initial( parameters: Optional[Union[_models.VpnConnectionPacketCaptureStopParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89315,7 +94199,7 @@ def _stop_packet_capture_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -89456,7 +94340,7 @@ def begin_stop_packet_capture( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[str] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -89518,10 +94402,10 @@ def list_by_vpn_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnConnectionsResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89615,7 +94499,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnSiteLinkConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89626,7 +94510,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnSiteLinkConnection] = kwargs.pop("cls", None) _request = build_vpn_site_link_connections_get_request( @@ -89695,7 +94579,7 @@ def get( :rtype: ~azure.mgmt.network.models.VpnGatewayNatRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89706,7 +94590,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnGatewayNatRule] = kwargs.pop("cls", None) _request = build_nat_rules_get_request( @@ -89746,7 +94630,7 @@ def _create_or_update_initial( nat_rule_parameters: Union[_models.VpnGatewayNatRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89757,7 +94641,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -89897,7 +94781,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnGatewayNatRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -89947,7 +94831,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, gateway_name: str, nat_rule_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89958,7 +94842,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_nat_rules_delete_request( @@ -90014,7 +94898,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -90071,10 +94955,10 @@ def list_by_vpn_gateway( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVpnGatewayNatRulesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90157,7 +95041,7 @@ def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.network.models.P2SVpnGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90168,7 +95052,7 @@ def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_get_request( @@ -90206,7 +95090,7 @@ def _create_or_update_initial( p2_s_vpn_gateway_parameters: Union[_models.P2SVpnGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90217,7 +95101,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -90346,7 +95230,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -90399,7 +95283,7 @@ def _update_tags_initial( p2_s_vpn_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90410,7 +95294,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -90539,7 +95423,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -90586,7 +95470,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90597,7 +95481,7 @@ def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_delete_request( @@ -90648,7 +95532,7 @@ def begin_delete(self, resource_group_name: str, gateway_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -90700,10 +95584,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListP2SVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90764,10 +95648,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.P2SVpnGateway"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListP2SVpnGatewaysResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90817,7 +95701,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _reset_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90828,7 +95712,7 @@ def _reset_initial(self, resource_group_name: str, gateway_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_reset_request( @@ -90882,7 +95766,7 @@ def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -90932,7 +95816,7 @@ def _generate_vpn_profile_initial( parameters: Union[_models.P2SVpnProfileParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -90943,7 +95827,7 @@ def _generate_vpn_profile_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -91072,7 +95956,7 @@ def begin_generate_vpn_profile( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VpnProfileResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -91121,7 +96005,7 @@ def get_long_running_output(pipeline_response): def _get_p2_s_vpn_connection_health_initial( self, resource_group_name: str, gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91132,7 +96016,7 @@ def _get_p2_s_vpn_connection_health_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request( @@ -91187,7 +96071,7 @@ def begin_get_p2_s_vpn_connection_health( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.P2SVpnGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -91237,7 +96121,7 @@ def _get_p2_s_vpn_connection_health_detailed_initial( # pylint: disable=name-to request: Union[_models.P2SVpnConnectionHealthRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91248,7 +96132,7 @@ def _get_p2_s_vpn_connection_health_detailed_initial( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -91380,7 +96264,7 @@ def begin_get_p2_s_vpn_connection_health_detailed( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.P2SVpnConnectionHealth] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -91433,7 +96317,7 @@ def _disconnect_p2_s_vpn_connections_initial( request: Union[_models.P2SVpnConnectionRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91444,7 +96328,7 @@ def _disconnect_p2_s_vpn_connections_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -91571,7 +96455,7 @@ def begin_disconnect_p2_s_vpn_connections( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -91634,7 +96518,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _list_initial(self, resource_group_name: str, virtual_wan_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91645,7 +96529,7 @@ def _list_initial(self, resource_group_name: str, virtual_wan_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_vpn_server_configurations_associated_with_virtual_wan_list_request( @@ -91701,7 +96585,7 @@ def begin_list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VpnServerConfigurationsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -91780,7 +96664,7 @@ def get( :rtype: ~azure.mgmt.network.models.VirtualHubRouteTableV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91791,7 +96675,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.VirtualHubRouteTableV2] = kwargs.pop("cls", None) _request = build_virtual_hub_route_table_v2_s_get_request( @@ -91832,7 +96716,7 @@ def _create_or_update_initial( virtual_hub_route_table_v2_parameters: Union[_models.VirtualHubRouteTableV2, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91843,7 +96727,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -91987,7 +96871,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VirtualHubRouteTableV2] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -92037,7 +96921,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_table_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92048,7 +96932,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_route_table_v2_s_delete_request( @@ -92105,7 +96989,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -92163,10 +97047,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubRouteTableV2SResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92245,7 +97129,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.ExpressRouteGatewayList :rtype: ~azure.mgmt.network.models.ExpressRouteGatewayList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92256,7 +97140,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.ExpressRouteGatewayList _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGatewayList] = kwargs.pop("cls", None) _request = build_express_route_gateways_list_by_subscription_request( @@ -92295,7 +97179,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.network.models.ExpressRouteGatewayList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92306,7 +97190,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGatewayList] = kwargs.pop("cls", None) _request = build_express_route_gateways_list_by_resource_group_request( @@ -92343,7 +97227,7 @@ def _create_or_update_initial( put_express_route_gateway_parameters: Union[_models.ExpressRouteGateway, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92354,7 +97238,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -92484,7 +97368,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -92537,7 +97421,7 @@ def _update_tags_initial( express_route_gateway_parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92548,7 +97432,7 @@ def _update_tags_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -92677,7 +97561,7 @@ def begin_update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -92737,7 +97621,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92748,7 +97632,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteGateway] = kwargs.pop("cls", None) _request = build_express_route_gateways_get_request( @@ -92782,7 +97666,7 @@ def get( def _delete_initial( self, resource_group_name: str, express_route_gateway_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92793,7 +97677,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_gateways_delete_request( @@ -92845,7 +97729,7 @@ def begin_delete(self, resource_group_name: str, express_route_gateway_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -92912,7 +97796,7 @@ def _create_or_update_initial( put_express_route_connection_parameters: Union[_models.ExpressRouteConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92923,7 +97807,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -93065,7 +97949,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ExpressRouteConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -93128,7 +98012,7 @@ def get( :rtype: ~azure.mgmt.network.models.ExpressRouteConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93139,7 +98023,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteConnection] = kwargs.pop("cls", None) _request = build_express_route_connections_get_request( @@ -93174,7 +98058,7 @@ def get( def _delete_initial( self, resource_group_name: str, express_route_gateway_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93185,7 +98069,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_express_route_connections_delete_request( @@ -93241,7 +98125,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -93295,7 +98179,7 @@ def list( :rtype: ~azure.mgmt.network.models.ExpressRouteConnectionList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93306,7 +98190,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ExpressRouteConnectionList] = kwargs.pop("cls", None) _request = build_express_route_connections_list_request( @@ -93365,7 +98249,7 @@ def _create_or_update_initial( network_virtual_appliance_connection_parameters: Union[_models.NetworkVirtualApplianceConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93376,7 +98260,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -93526,7 +98410,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkVirtualApplianceConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -93589,7 +98473,7 @@ def get( :rtype: ~azure.mgmt.network.models.NetworkVirtualApplianceConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93600,7 +98484,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceConnection] = kwargs.pop("cls", None) _request = build_network_virtual_appliance_connections_get_request( @@ -93635,7 +98519,7 @@ def get( def _delete_initial( self, resource_group_name: str, network_virtual_appliance_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93646,7 +98530,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_network_virtual_appliance_connections_delete_request( @@ -93706,7 +98590,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -93765,10 +98649,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.NetworkVirtualApplianceConnectionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93855,7 +98739,7 @@ def get( :rtype: ~azure.mgmt.network.models.BgpConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93866,7 +98750,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.BgpConnection] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connection_get_request( @@ -93906,7 +98790,7 @@ def _create_or_update_initial( parameters: Union[_models.BgpConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93917,7 +98801,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -94057,7 +98941,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BgpConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -94107,7 +98991,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94118,7 +99002,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connection_delete_request( @@ -94174,7 +99058,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -94249,10 +99133,10 @@ def list(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubBgpConnectionResults] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94306,7 +99190,7 @@ def get_next(next_link=None): def _list_learned_routes_initial( self, resource_group_name: str, hub_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94317,7 +99201,7 @@ def _list_learned_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connections_list_learned_routes_request( @@ -94374,7 +99258,7 @@ def begin_list_learned_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Dict[str, List[_models.PeerRoute]]] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -94421,7 +99305,7 @@ def get_long_running_output(pipeline_response): def _list_advertised_routes_initial( self, resource_group_name: str, hub_name: str, connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94432,7 +99316,7 @@ def _list_advertised_routes_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_bgp_connections_list_advertised_routes_request( @@ -94489,7 +99373,7 @@ def begin_list_advertised_routes( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Dict[str, List[_models.PeerRoute]]] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -94569,7 +99453,7 @@ def get( :rtype: ~azure.mgmt.network.models.HubIpConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94580,7 +99464,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubIpConfiguration] = kwargs.pop("cls", None) _request = build_virtual_hub_ip_configuration_get_request( @@ -94620,7 +99504,7 @@ def _create_or_update_initial( parameters: Union[_models.HubIpConfiguration, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94631,7 +99515,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -94771,7 +99655,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubIpConfiguration] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -94821,7 +99705,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, ip_config_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94832,7 +99716,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_virtual_hub_ip_configuration_delete_request( @@ -94888,7 +99772,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -94945,10 +99829,10 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListVirtualHubIpConfigurationResults] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95027,7 +99911,7 @@ def _create_or_update_initial( route_table_parameters: Union[_models.HubRouteTable, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95038,7 +99922,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -95175,7 +100059,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HubRouteTable] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -95238,7 +100122,7 @@ def get( :rtype: ~azure.mgmt.network.models.HubRouteTable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95249,7 +100133,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.HubRouteTable] = kwargs.pop("cls", None) _request = build_hub_route_tables_get_request( @@ -95284,7 +100168,7 @@ def get( def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, route_table_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95295,7 +100179,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_hub_route_tables_delete_request( @@ -95351,7 +100235,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -95406,10 +100290,10 @@ def list(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListHubRouteTablesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95488,7 +100372,7 @@ def _create_or_update_initial( routing_intent_parameters: Union[_models.RoutingIntent, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95499,7 +100383,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -95641,7 +100525,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RoutingIntent] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -95704,7 +100588,7 @@ def get( :rtype: ~azure.mgmt.network.models.RoutingIntent :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95715,7 +100599,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.RoutingIntent] = kwargs.pop("cls", None) _request = build_routing_intent_get_request( @@ -95750,7 +100634,7 @@ def get( def _delete_initial( self, resource_group_name: str, virtual_hub_name: str, routing_intent_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95761,7 +100645,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_routing_intent_delete_request( @@ -95817,7 +100701,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -95872,10 +100756,10 @@ def list(self, resource_group_name: str, virtual_hub_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.ListRoutingIntentResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95960,10 +100844,10 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Web _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96025,10 +100909,10 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.WebApplicationFirewallPol _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96089,7 +100973,7 @@ def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.network.models.WebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96100,7 +100984,7 @@ def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[_models.WebApplicationFirewallPolicy] = kwargs.pop("cls", None) _request = build_web_application_firewall_policies_get_request( @@ -96204,7 +101088,7 @@ def create_or_update( :rtype: ~azure.mgmt.network.models.WebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96215,7 +101099,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WebApplicationFirewallPolicy] = kwargs.pop("cls", None) @@ -96259,7 +101143,7 @@ def create_or_update( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96270,7 +101154,7 @@ def _delete_initial(self, resource_group_name: str, policy_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_web_application_firewall_policies_delete_request( @@ -96321,7 +101205,7 @@ def begin_delete(self, resource_group_name: str, policy_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py index 0e990e97a916..5d7e66d2c678 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py index b44481ffe467..c0c9995b8666 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py index cdcd32eaa67a..4f9bed8eff2f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableServerVariablesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py index d5fd58fad177..c3b0480b6b2f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py index 6d49b4e25e1d..3ecbc2f2bcd7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py index 3a27e3a47edb..8b2288dca908 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py index aeaca4fc6a7e..31febe3ae36e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py index 2fed9c8f2a4e..3970b5325ce6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py index 66df0e14fb57..34a84afee543 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayBackendHealthTest.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py index 97d47f9fb167..b050b0ec3b85 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py @@ -213,6 +213,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py index 92e2de04a6ba..cebe57f1f8e1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py index 317cedeb992b..4258a50fd0c6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py index 9554cd47aa8e..92aed4b3abba 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py index 6c1b24238bf3..1ad3a940d3f9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py index 6871557834a8..c07dc77bc3c2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py index a9ec97c1e330..d49dbd85707e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py index 58874ab567a1..a0e5c54b886d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py index 952fafe3d685..c92a07c14808 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py index dc4ce70139ee..0c1e602d5cd5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayPrivateLinkResourceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py index 7ec8fe964912..2d960b9690a5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStart.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStart.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py index fb9882355229..0890d92857b5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayStop.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayStop.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py index a9378fc571eb..f147e7b27ec6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py index 347c82da3a85..70674fa22fe2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py index 71cc93340b28..74ed3d397922 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py index 51dfe74a1f45..57f9853d8385 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py index 56e7a1c6e119..cb06131ddb2e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py index f5d650fc09a9..9925840724b9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py index c2e597ba9b70..57fffae16c2d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ApplicationSecurityGroupUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py index d5bb0df49463..43b89183a9ee 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py index 464cf459beb4..8dd2a89a25c6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py index 1fd1ce8dc05d..668795b47c08 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsResourceGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py index 4587a54ff7ec..b3c5c4716ff0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableDelegationsSubscriptionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py index 85796d23aab1..a2e5e2a123ed 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py index 454fdbd3e441..06f523068c0a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py index 4cbb9174aaf6..0dbb43da96d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py index d5cf59947fd6..55994143d535 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AvailableServiceAliasesListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py index 9193fed2b796..88f34c260244 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py index 8ad55d13206e..b05cc5a7636a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallFqdnTagsListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py index ec1d680574c0..2cdfa6215357 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py index aad5a495dd7d..f2b4eeb1750b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithAdditionalProperties.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithAdditionalProperties.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py index ff4e56dbd26a..79efbf50e6fa 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithIpGroups.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithIpGroups.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py index 78f5283025cb..bc6f8cadcf61 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithMgmtSubnet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithMgmtSubnet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py index d020c67c8b8b..c1aa6c4f5ddd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallGetWithZones.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallGetWithZones.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py index 191d8d456774..035ca09f7265 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py index fbdc6fabd000..e7c24ea578ec 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py index bab1b8491133..2539129e0345 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallListLearnedIPPrefixes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py index 2496569af28d..4dd1437e225a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py @@ -48,6 +48,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py index 0d920914b322..54f2bdccc79d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py @@ -138,6 +138,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py index b8bf2f5d1fe5..67cf7ebc15d8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutInHub.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutInHub.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py index f52e42bd4db5..48496886a0a8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py @@ -140,6 +140,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithAdditionalProperties.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithAdditionalProperties.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py index 4cab1f77335b..745f7c57e07a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py @@ -138,6 +138,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithIpGroups.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithIpGroups.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py index 58971688c639..8bb1283feebe 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py @@ -149,6 +149,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithMgmtSubnet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithMgmtSubnet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py index 757e7996f4d9..4fefe4fc5295 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py @@ -138,6 +138,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallPutWithZones.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallPutWithZones.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py index 066c393b4006..bf343fe9002e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureFirewallUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureFirewallUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py index 7650366bac12..67096575a821 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoriesListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoriesListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py b/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py index 8e19c89e4599..506597d09e8d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/AzureWebCategoryGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/AzureWebCategoryGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py index 8a2df1636a06..b734f7e7818d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py index 7fbc253fccf3..26d7e39aa033 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py index b247d9f29a6e..872cf541ff91 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py index e5212709ae2e..5729723c65d7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostDeveloperPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py index 4d7aca25e22c..b561eb2e5334 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py new file mode 100644 index 000000000000..015b6cabb806 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python bastion_host_get_with_private_only.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.bastion_hosts.get( + resource_group_name="rg1", + bastion_host_name="bastionhosttenant", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py index 28536fc2da25..55562d4b1210 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py @@ -32,11 +32,11 @@ def main(): response = client.bastion_hosts.get( resource_group_name="rg1", - bastion_host_name="bastionhosttenant'", + bastion_host_name="bastionhosttenant", ) print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostGetWithZones.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithZones.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py index ded8bc22e703..1d29f7ba87b8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py index 4788f905f99f..a9ec59bc29d8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py index bbdb8b06d41c..64b9150bb7f0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPatch.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPatch.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py index f2d3a8f7ce5c..911ad5552e3d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py new file mode 100644 index 000000000000..041edfe9e208 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py @@ -0,0 +1,57 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python bastion_host_put_with_private_only.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.bastion_hosts.begin_create_or_update( + resource_group_name="rg1", + bastion_host_name="bastionhosttenant", + parameters={ + "properties": { + "enablePrivateOnlyBastion": True, + "ipConfigurations": [ + { + "name": "bastionHostIpConfiguration", + "properties": { + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet" + } + }, + } + ], + } + }, + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithPrivateOnly.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py index bf2d828ded0c..386eaf16f90d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionHostPutWithZones.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithZones.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py index 7d470f31681d..7c4bfa9cd8d2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py index 42a0d31164dd..8ca429c16cbb 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionSessionsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionSessionsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py index 32bf18d8bc97..7d6dd1c083b9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py @@ -52,6 +52,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py index 6063f2fe1cf9..045df1a405fc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py @@ -50,6 +50,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py index ac7a707f1fc9..aa29ed29c997 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkDeleteByToken.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py index bc208adb49ae..fc1707cc78ed 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py @@ -52,6 +52,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/BastionShareableLinkGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py b/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py index 04d0f850b4a9..38a9708eac77 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py +++ b/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckDnsNameAvailability.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py index 40426135a1a2..6c46b73b6b66 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py +++ b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibility.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py index 65b1e6bc6eca..89a9a9d39407 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py index 3a95611ac9a0..e4bf6388b4a6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py index 3df7168e6c40..675aaf53e086 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceNetworkInterfaceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceNetworkInterfaceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py index 9d5801434daa..3c81ff2629f0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py index b0e3635fdd52..90fc205a6d1f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServicePublicIpListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServicePublicIpListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py index 4c3f1b231813..29a4f9d90301 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py index 6c3e22378b3b..c36b15686a8e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py @@ -41,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceRoleInstancePublicIpList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py index 120dba2e964f..aa43e8d4ab72 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py index 8703df6564c0..69c51da38ecc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py index b77e372a225d..7bdafbe4569c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CloudServiceSwapPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CloudServiceSwapPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py index 9a92d1f91c72..81f282cbf3a7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py index dc29e682fc95..694098fe9d63 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py index 67e3928ab28e..78126e60061f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py +++ b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py index 0a0b77c0c5d4..ef3136a61d57 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixCreateCustomizedValues.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py index c1d47c8b0a98..80952dfbbc93 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py index 5f77bc44b115..9ca789eb9c3a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py index 4e5cbaeb094c..3433082a9232 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py index cfca99623ebe..2ed08cd66f81 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py index a93516e6ff9e..f78f41f2a597 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/CustomIpPrefixUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CustomIpPrefixUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py index ec7bb700d1a8..f1a0cfe0b3a3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py index 1daa65424ce8..30a04b0901e4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py index 3ca0a1a20e7c..ab7e3adf872f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py index 770565c44e1e..4eb970cd5017 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosCustomPolicyUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosCustomPolicyUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py index b1431a10239c..a3798bac6a5c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py index 23679f64774f..b0bfa61ca89b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py index c42604c2e07c..01017bb8b8f9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py index 26b09e90c44f..98e376c14c93 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py index d8c9fa1f67f8..ebfd7aab7ade 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py index 5cd2ce10ffaa..d4b03cf38e5a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DdosProtectionPlanUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DdosProtectionPlanUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py index cdd4e277e61a..cc87ae7410fe 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py index 964f1ecb7fc2..34b6747d3906 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DefaultSecurityRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DefaultSecurityRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py index 28b6815770ac..b169fb964ebd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py index 13bdf8618dbd..c3c09f8aec02 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py index eed9199cace8..c40070f86bd3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py index e6a0a43ae2b5..5b6baea0ad97 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py index 82b588bb7a3f..4aba83cf2576 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/DscpConfigurationListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/DscpConfigurationListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py index 941cbe0afdc7..1cac55c07b50 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py +++ b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForConnection.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForConnection.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py index 74aaa7e1ff29..a4afe63284e6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py +++ b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForRouteTable.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForRouteTable.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py index 471afaf6c293..49051a63230e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py +++ b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EffectiveRoutesListForVirtualHub.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EffectiveRoutesListForVirtualHub.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py b/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py index 72a6336a6bbb..ec492f14f8e3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/EndpointServicesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/EndpointServicesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py index 283abbca2809..494b518efc1e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitARPTableList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitARPTableList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py index 9b8646403ef6..51a48a5fd25d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py index 75f93fc07f51..aa27c9ad1d49 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py index ec159d772931..c5071f59b230 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py index bab493871eec..16a49d625207 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitAuthorizationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py index 6e93a8e445ff..299d94282355 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py index c68fa9375ffd..8581e278c595 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py index 4920fefcb1af..5645a425a663 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py index b1c22c2160ba..7bc9b005fd8d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py index 4a52e605c05c..b4577aa4b4ce 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py index 6ae54f691e91..f9d19bb465d6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py index 8100ade8f746..54e98ff17538 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py index 602fc636b5ae..bec453473ef9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py index c525270ff9fe..261a6abae2e0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py index 1037c0125551..6c01f08a0060 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py index 0e3b8d6acade..6641e1fb6adf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py index 045ac7c91144..c9f8e6fb80c3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py index 0adcff3e3295..380fc080d1f8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py index dc6b35852c15..d12f89f5eb71 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py index c3880e6c5c4e..d93ba2459d4e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitPeeringStats.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py index f8872f12f28c..ef52b5edfe27 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py index f862229217d4..516602009ae5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitRouteTableSummaryList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py index 60f85275f540..c83dfdd395db 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitStats.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitStats.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py index 2f3413a49625..bfb7c3c05001 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCircuitUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py index 93a066ecd275..e071ffb782af 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py index dd1f68a1c656..1e47963bffc2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py index 7c13d4ec931d..3473f17566ff 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py index b273eb3d366e..0b56eb847104 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py index 3fbf9ef4f6ef..7983d0481359 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py index a2e8687418f3..642165be4e26 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py index a79efb278774..7a182f7a79b5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py index 97da044aba0d..59517444b1ab 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py index 0707baed28c2..612db3acf2b0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py index de531e6efacb..5d843d8595b5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py index 85251c58bf22..e72387eac88d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py index dde01cedb3c8..1dff6c87229d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py index a58c428af865..a168f2e5deb3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py index dd7af4a74d11..a72944923644 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsArpTable.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py index d53d5e69e148..f0bd80cc92b3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTable.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py index 815d1d9b097f..7a9e42e4461d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py index d9a212b80d4a..ab918732c440 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py index aa8db2fa1ba2..0d667873e893 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py index 687453779ee9..ed1bfffd6aed 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py index 2add37610e2c..c4be65a4d179 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py index fa1938bd85ff..9eb6b5cb505e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py index 53a14a7b1719..f70b92cd887f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py index 6ecdccc8fa55..953b37d86e9d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py index 69261de9a93e..37e255514125 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteLinkList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteLinkList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py index d28f97c68847..496b48ec07b6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py index 55fd078db163..86cc5d448d70 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py index 4017e60f1fb8..8d22c955c971 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py index 47fe85ec5fd9..4fa6d4450014 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortAuthorizationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortAuthorizationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py index ae3a1d1be7ca..5e4d27d94065 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py index ad548f32fb59..dbd65db5151e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py index 23b7eed35b84..bd02ec74266a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py index ff4979c0437c..46a71228dd34 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py index 896f1d2cf13d..5e4b9d1ebc36 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py index 305d5515ebcc..e0f459d595f0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateLink.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateLink.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py index fb6007392896..9703f8baada7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py index 3a77f246519c..18bb4265eedc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py index 0d3c52946577..3eff78311b23 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRoutePortsLocationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRoutePortsLocationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py index a8c6080a6047..c6812a937148 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ExpressRouteProviderList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ExpressRouteProviderList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py index 0f68fe4f12e8..de5427a0e756 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPort.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPort.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py index cf2e9a400f4b..c2fa7005a355 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py @@ -34,6 +34,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/expressRouteProviderPortList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/expressRouteProviderPortList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py index a99086c8ee46..b7693a6353a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py index 186671a396f3..21674a4836ba 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py index e40181a7c6a2..f5eb75bdb6c0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftDeploy.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py index 143516c8b3d2..7ab0b574855e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py index ffa8c202c96b..c9e859a92f40 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py @@ -94,6 +94,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyDraftPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py index 6aa15947b81c..ce918d13f495 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py index 46f1dabd916d..d845468b07b3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py index 4b13c05fa1b6..0abce81cd7be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py index 71dd6625d7bd..3347943ecd3b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py index b23218708ad5..5efb590fad7e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py @@ -64,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py index da9200b434b9..ced8ec684f54 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPatch.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPatch.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py index ae230ed86876..b24ffc4b37ae 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py @@ -100,6 +100,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py index 3b252702ff62..5a991dfec817 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverrides.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py index 0459d24e444f..986413962ccd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py index b5d83359eea0..8f69870f8a89 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py index 79cfb0e0b7db..3962c2638ec0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py @@ -37,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py index 787605058716..74cc4cac67de 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py index a5625c7fb140..604318c3db42 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py index 473c90622b94..a1621af392f4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py index 5270a311bef3..cdc9fe1d5e63 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py index af7fcb7f0fdf..3443504e397e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py index fe742a33ca22..88bb81e1766a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py index 262287c2534f..c35c06bf17df 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py index bbb7efc66627..9da81f391cb2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py index 164b32c52016..399a1a681ea3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py @@ -64,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py index 71da89ebcfbb..098b9209ff62 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py index 035bd86c0499..3d1a3171596e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py index ed99420954e7..25fcd42fe843 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py index 95ff9a0a1a24..309be6ae96a4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py index 921e37921648..6ed7c21b3c92 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py index 5bd3a56a4a4c..2719b0ef1360 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPatch.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py index 63543879f18a..d7306288ce8b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/FirewallPolicySignatureOverridesPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py b/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py index e44a6e9d08ca..840e8e138bfa 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py +++ b/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateExpressRoutePortsLOA.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateExpressRoutePortsLOA.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py b/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py index 687cdbfcaab9..0f77f4f520a9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py +++ b/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py index 484a85f0529b..0abfeedb85b9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py +++ b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifests.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py index 40809c2799da..6cf6d573725f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py +++ b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py b/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py index fb8ef63f7d4c..63b45f1b2368 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetInboundRoutes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetInboundRoutes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py b/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py index 0153563da82f..23835a7a301d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetOutboundRoutes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetOutboundRoutes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py b/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py index 86dcad7144fd..8d9739d1887a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py +++ b/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/GetVirtualWanVpnServerConfigurations.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py index 5b5734fe9dcd..a6dbac15dfdb 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py index bc6e5d6de7a8..220d8c3aed6a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py index 8828a6d94c59..3f5083f57491 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTableList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTableList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py index c276b0c5c2b8..1c617e1f1c6f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubRouteTablePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubRouteTablePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py index 72522c52c3e5..117cacf7f1cd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py index dc2eaf616a1f..b719f75770ff 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py index 3e83be3d471e..90914414d957 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py index 618c527a69f4..0d32d74aac1a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py @@ -80,6 +80,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/HubVirtualNetworkConnectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/HubVirtualNetworkConnectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py index 90101d7675c3..eefea2856473 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py index 4219d72421f6..b7cfaf6e4560 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py index 755c628a13ea..825bd9e41af2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py index 69c292bdc696..9179286cdf0a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundNatRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundNatRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py index e021c567ca71..1ea56ed24f35 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py index b8466916071b..178c52e3c202 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/InboundSecurityRulePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py index f28655608966..231226186f40 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py index 696d28248543..5369dffddb58 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py index 0955a1191d8f..b7367ed69d2a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py index 007692b1f689..2519067bc658 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py index abcba4fc1aa1..0f6c9227ce1e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py index 78b3ec12ee73..934d33afa377 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpAllocationUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpAllocationUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py index 6ac9b5a7508f..d1d41ea3550f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py index facf274350c4..3054993d9f81 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py index f6d5b8bfebd4..eb0f488d7548 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py index aa2dfe91cd92..405668aacdda 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py index e479454e1aa6..08b995b421cd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py index d0d5970941b3..d73c0fd93dab 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/IpGroupsUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpGroupsUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py new file mode 100644 index 000000000000..0d0906199f65 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py @@ -0,0 +1,51 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.begin_create( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + body={ + "location": "eastus", + "properties": { + "addressPrefixes": ["10.0.0.0/24"], + "description": "Test description.", + "parentPoolName": "", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py new file mode 100644 index 000000000000..d11dde2b62ac --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + client.ipam_pools.begin_delete( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ).result() + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py new file mode 100644 index 000000000000..5e6a3f87055e --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.get( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py new file mode 100644 index 000000000000..dc8a8ddcdc66 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_get_pool_usage.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.get_pool_usage( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py new file mode 100644 index 000000000000..d415c0ed41a2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.list( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py new file mode 100644 index 000000000000..865bc5c3d169 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_list_associated_resources.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.list_associated_resources( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py new file mode 100644 index 000000000000..25515d9e04e2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python ipam_pools_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.ipam_pools.update( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py index 932c82003e37..401e2ea28ee2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py +++ b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py index 042f4ccc496c..e3db6b65d301 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py index 5e12fc4217b2..cc3f25c31cdc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py index ef2942370400..2693beded82b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py index 343fd9cc55c1..11a83e20ea7d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py index 835ff366adea..121829a535fd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerBackendAddressPoolList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerBackendAddressPoolList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py index 856963869bfc..6efb63e68f84 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py @@ -106,6 +106,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py index 69b2a1f45193..52d5c57d8b5e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py @@ -109,6 +109,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py index 5c59de0f1c85..343da6949907 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py @@ -103,6 +103,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py index 916e01dc07be..647b34aa77ef 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py @@ -97,6 +97,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py index 6a3ced731439..bd549bbb40d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py @@ -105,6 +105,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateGlobalTier.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGlobalTier.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py index 5e31d314b46f..1799139d8227 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py @@ -106,6 +106,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateStandardSku.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateStandardSku.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py index 53771b3a1a7e..90909533cabd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py @@ -79,6 +79,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithInboundNatPool.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithInboundNatPool.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py index 9e40e1775ea2..2afa7923e16e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py @@ -122,6 +122,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithOutboundRules.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithOutboundRules.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py index ff2817bd074e..e7a985be9a6d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py @@ -116,6 +116,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py index 11960bf09f0a..d87a3bd46aa6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py @@ -107,6 +107,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerCreateWithZones.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateWithZones.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py index a286eed6b867..5ed2d58ff826 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py index d7a812c9a3b8..878ca845ca4c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py index 7d31d0246b56..2baa1ae79f58 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerFrontendIPConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py index 861132990e65..bef07c6a02d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py index 9bc9f28da34b..fed887bd347b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerGetInboundNatRulePortMapping.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py new file mode 100644 index 000000000000..66293d09cd03 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python load_balancer_health.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.load_balancer_load_balancing_rules.begin_health( + group_name="rg1", + load_balancer_name="lb1", + load_balancing_rule_name="rulelb", + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py index 802970c29f09..424e4d72641b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py index 52c3b1a0a9dc..1175ca44babe 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py index 0e4a83537f1d..9a92623c38be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py index 81357608e4b4..89ea9b6b9d69 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerLoadBalancingRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py index 4c5fde5795b9..1c453c28ac2d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListSimple.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py index 61642ce9b015..ca52b463838c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerNetworkInterfaceListVmss.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py index c9af3f52d9d9..ce6f0c05bc5c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py index 72b732cf5f4b..97bafd85c0e9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerOutboundRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerOutboundRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py index cc8bb67a4fa4..eff36f5f3ead 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py index ea7439a58bdd..08393f66ebb5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerProbeList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerProbeList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py index 5246117f9c02..4ec41e2c481d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancerUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py index 29cc53c9efd3..87ff75dc5852 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py +++ b/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py @@ -55,6 +55,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LoadBalancersSwapPublicIpAddresses.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py index 36e81652218a..22e1e3cb173b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py index 31c7af8b930c..3743748b9ee2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py index 6bf5cf6fdb66..7c499088dcdf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py index e6ce7850bd65..7fc613a8126a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py index 1602703ca9b9..3870be29f451 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/LocalNetworkGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py b/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py index 166201d40d64..6da500267519 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py +++ b/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/MigrateLoadBalancerToIPBased.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py index 3f4d9307f6b2..450a1b68cde6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayCreateOrUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py index 38511e59f099..38d89f9fd124 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py index 2cf7528a368c..92cdf547d2e7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py index 5102e43374d2..ec5e7d511843 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py index 0139c2beed83..15b3a1adfe05 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py index 5ae1ba5a4445..e4c7e5986d1d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py index cafcbc31e6b2..5318ee04b631 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py index 27ca022ea1ac..d82f79ed8aaa 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py index b85745855571..c5e2074a01a9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NatRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NatRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py index 2e125ff1112b..65a47f862837 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py index ee9a3f7c9a58..a49561731cd3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py index 02bfeb5ee27b..b9aad3c9c1b3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py index 5ec06d1150f8..e52a9b74189d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveNSGList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py index 83539b5acfa1..17251fb4b405 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceEffectiveRouteTableList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py index ad48b4726793..e420d7d75378 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py index 106fcc6d57a8..df6a5e125501 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py index c843416285de..f2f8da4cb83b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceIPConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py index 625b84398fe9..c4b01f6a1000 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py index ade3d8116e34..94514de14cb4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py index 4ab00d83969b..4e98a0f83e4c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceLoadBalancerList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py index 012d1054aa4a..349c39e7b673 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py index 82c0cac6eea6..339175611956 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py index dbe20b6f85bc..315dd4eeab19 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py index f89c133ca43a..2ba72cef8a2c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceTapConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py index 0d6d694b06d9..89d97ed50a0f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkInterfaceUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py index d346ecb76283..6ea8239b0372 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py index c527057e9484..7c9eb928e272 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerActiveSecurityAdminRulesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py index 6534228473e0..ab37a76fb053 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py index e942cf590e4f..227c50460be6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py index 008eca8454ce..270f4293dd25 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py index 25bf9aa9833a..8f9b57ae3503 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleCollectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py index 16af13a221d7..8715dffd98a6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py index b6a96a8a3806..e7151b6f94bc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py index f8166906ddcf..848ef52ba16b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py index 18065663cfb5..f792f7ff2234 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerAdminRulePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py new file mode 100644 index 000000000000..5740a8b6bf23 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py @@ -0,0 +1,64 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python network_manager_admin_rule_put_network_group_source.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.admin_rules.create_or_update( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + configuration_name="myTestSecurityConfig", + rule_collection_name="testRuleCollection", + rule_name="SampleAdminRule", + admin_rule={ + "kind": "Custom", + "properties": { + "access": "Deny", + "description": "This is Sample Admin Rule", + "destinationPortRanges": ["22"], + "destinations": [ + { + "addressPrefix": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", + "addressPrefixType": "NetworkGroup", + } + ], + "direction": "Inbound", + "priority": 1, + "protocol": "Tcp", + "sourcePortRanges": ["0-65535"], + "sources": [{"addressPrefix": "Internet", "addressPrefixType": "ServiceTag"}], + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py index 0e5d8c7babaa..abad8868f2b2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerCommitPost.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerCommitPost.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py index 993e279987a2..8c4fb5c818f9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py index 855a198eefc0..72430b09f5b8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py index 5a69eb253460..0e806d609485 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py index 1ff3e71d4065..ea38e894f6fa 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionManagementGroupPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py index 5557ef84651e..5a59a46dd69f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py @@ -35,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py index 2a1e700d2ed6..15ab22e78f09 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py index 24ca308dd39d..f6d79fc92098 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py index b010ea614cf4..85f2663e2671 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectionSubscriptionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py index d19c782045a5..32ec60e1179a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py index 0f403f68f25d..6396ac9dab4f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py index 34093ae6784e..74d21193babf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py index 853c07a65772..5aa6b4820a37 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerConnectivityConfigurationPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py index a9ffd36afb31..48ce8ce49e71 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDefaultAdminRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py index 10791eaa37bc..76196434c9bd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py index 0b443d04ca1f..e7889b4f829a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDeploymentStatusList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerDeploymentStatusList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py index 1fea39455f70..dba990b282ad 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py index 5a67cec21cdb..c0268f99a7be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py index 87adf83a39e6..115a8704d5ce 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py index 696d32dd98fb..351463facfb9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py index b6e7d5acdb0f..74a6a74e645f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py index 2e7ca960a77e..b2101fa09160 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py index 6a594073e470..51ffd9757645 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerGroupPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py index b5b988fa1335..81937c75769c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py index 1964aba58cf2..9c4140af9114 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py index 90557939e71c..0c81371858dd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPatch.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPatch.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py index ebd5b98101bb..006013d7dc02 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py index 0c586fb254be..2ae8c53bffec 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py index 23f1963d8854..358ec0683e32 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py index e39f726c27ef..9d3ff7145db5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py index 128f0e9e99cb..a828d14ac21e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingConfigurationPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py index d0d7dc8c8dbb..174106104b98 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py index 61e437405744..9f1f0773cfbc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py index e417cc590f14..5bf15687bb6f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py index 601aa30d20ee..b1451650b4bf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleCollectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py index e5597b5a9b17..aded83d6e295 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py index 26fb4ff97ae1..9f0d8e9ac716 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py index 83fad7c6c411..6ef259ce212c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py index fa38c212960f..dbafdb3aa9d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerRoutingRulePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py index a7ed2b0978cf..efc425f0b17b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py @@ -37,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py index f521e2e6c9fa..88148471fd61 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py index 1ce58f615d52..c387479011dd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py index 96d5c6c2850e..0b7a56f8d1f9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerScopeConnectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerScopeConnectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py index 448069840f50..9d784a185e2f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py index f701017d6373..0e57e764bbcc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py index d87e62785988..1b8e9b1bb5b2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py index 14206c9c5eac..e416d75baf64 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityAdminConfigurationPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py new file mode 100644 index 000000000000..4a2cd7bdbfc2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py @@ -0,0 +1,49 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python network_manager_security_admin_configuration_put_manual_aggregation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.security_admin_configurations.create_or_update( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + configuration_name="myTestSecurityConfig", + security_admin_configuration={ + "properties": { + "description": "A configuration which will update any network groups ip addresses at commit times.", + "networkGroupAddressSpaceAggregationOption": "Manual", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py index dd67106eec80..06b034d4b9be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py index a26f4a71ffdc..823cca86fe31 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py index 5a5637e5281f..5f6c55c2e552 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py index c85fe4aa436c..efdfd0c910ab 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserConfigurationPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py index c7c410df737d..edc942b4ba72 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py index 8a87ffb4784f..745bde16de39 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py index a6a04076de03..503ea7f311d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py index baced938369b..1983cd610cce 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py index 41f62351606c..e187f9b2e7e3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py index a6ed4568e8a8..8feb8c50af45 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py index 058c2f0f3901..e87608d7cee9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py index 03dede821b5c..e623579e94ae 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerSecurityUserRulePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py index 2cf9eff949a4..eef067639166 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py @@ -38,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py index 92aa9f27d1f9..7b623dcf287e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py index 924b1e9e14d0..b90c4142627b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py index 82887b109456..d9091bf11ee3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerStaticMemberPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerStaticMemberPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py index df88b73d2ff0..0fc080b4a078 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileCreateConfigOnly.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileCreateConfigOnly.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py index 40ea27b54a6a..f9b0f0931d6d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py index a6d5f8feb3c6..9df467f3a753 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetConfigOnly.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetConfigOnly.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py index ac7cd3586aa1..e898c9babfed 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileGetWithContainerNic.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileGetWithContainerNic.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py index 98d3cf81898c..73ee531fb4b7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py index 860239af8bf8..0bbb569aa03d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py index 0e188126aaf1..8b3f9e145330 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkProfileUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkProfileUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py index ddc652ade4a3..d8bcf05a0b11 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py index 5d8405cbe7e6..97c7db4ead0a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupCreateWithRule.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupCreateWithRule.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py index 5d640401e728..b2aeba9ccb4a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py index 13028dacdf9a..48576e5a7bc2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py index 6f1aaefc5511..910a330f178d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py index 5752a184a9ee..835ef90fe56a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py index 293bee937bca..9c4478635521 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py index d94a9633acc6..d2a11f829535 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py index f61ce2e6c530..d27735c02e78 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py index 3eca375960b9..18f036a73aff 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py index f4531ba18255..46418ee7a6be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkSecurityGroupUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py index 07f312f79136..9e3d90a8044d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py index 666bc0c57e8e..2b4a8e0bb1fc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py index 46614d3e1b0e..7f53c78190e7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py index f9dfc4cd28a5..25c0577d5338 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py index b1988e0e38f0..9db495d3f7c4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceEmptyRestart.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py index 380c0df0d5a3..44020160e822 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py index ee271dd2d680..a3428776d0c5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py index f8c799c7b511..1296c5dbf706 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py index 17caa107c224..f1f24b2af230 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py @@ -88,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualAppliancePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualAppliancePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py index 5436bb767a5a..30af763e79fa 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSaaSPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSaaSPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py index d9e8c203ec7a..fbfd829a4582 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py index bb8584deceb1..4f551649b230 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py index 40b65138e3f6..b9137767abf7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSiteList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSiteList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py index 028aec460d2d..9cc9c309c339 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSitePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSitePut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py index b5319dff5bbf..aa8c943f765c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py index b0dc82255b12..dad53445962c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSkuList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSkuList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py index be57938225ed..6dd9f5ab8614 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceSpecificRestart.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSpecificRestart.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py index 25e9da264de8..6257d9444e84 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkVirtualApplianceUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py index 59ec0aa8a90b..f74b1ceee52e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAvailableProvidersListGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py index 0d97536f6757..d49fef4f34ac 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherAzureReachabilityReportGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py index 20ef05cf7746..3ccfd97b99ae 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py index 2ca6c56011bc..8ef3e8e8ad4e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py index e8c36bb0d52a..7249560b2b92 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py index b16aa9a4aac3..9beb20903463 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py index 2adfdc3e2084..324eadcae4b1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py index 7d76b9ea7435..5fed5ef94edd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorQuery.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py index f938c52533e7..366bbaba8d42 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStart.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py index cfb843596d1e..528096f7fbcc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorStop.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py index 8329ffe86da1..9e243bdbe523 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py index 799510f12aa7..947d1e2f85d9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectionMonitorV2Create.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py index ea575e0831be..6caaaca33d61 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherConnectivityCheck.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectivityCheck.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py index f9abce9d4595..f8762e5c905a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py index 8598dbf76cfc..5d0cfefd6d5e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py index 7c0e8ac2b75c..c4960cc7b5ac 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogConfigure.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py index 4bb2735d1da4..c1ddc0b19055 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py index 38d9dab81411..4f986b8b1ac1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py index 4c189c4e4705..b8ee4bee64be 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py index ad1a7c88bf2f..f1bca7ca0016 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py index 6724a8af8ef8..7faa6dbff206 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogStatusQuery.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py index 6a9b5d8edb00..87c0a35d1c98 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherFlowLogUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py index 2c067ea53d15..38d7a92181a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py index 521a9581b629..a77dc406f6bc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherIpFlowVerify.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherIpFlowVerify.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py index 4cd3ae9e2ef9..5fb617e35678 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py index 0abcdb068ae9..72985c07c821 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py index cae69485d718..7b691d0cca9f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py index f2b68c01bd0a..056286261a59 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherNextHopGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherNextHopGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py index ca4f1e2b6834..fc3ef1a48c25 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py index 4b58c10b1388..cc88c8e5e62b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py index 03d21a1e9788..3c9629c2dee3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py index c91eaeb9bd8d..e8efb4b9ec57 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureQueryStatus.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py index 7630799c836b..1ff2558025d2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCaptureStop.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py index 6d9c04657f1d..cb43694e212e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherPacketCapturesList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherPacketCapturesList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py index 92c6b7ff7d42..b9bf6f946d5e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherSecurityGroupViewGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py index d79c4a3545a6..374b9c7f420f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTopologyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTopologyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py index 772ab6c3f17a..6f109c7a0bc5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py index b92d7a7505ea..a72609787980 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherTroubleshootResultQuery.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py index 00140164d780..4d3927299166 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkWatcherUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/operation_list.py b/sdk/network/azure-mgmt-network/generated_samples/operation_list.py index 949d5c7bb8b0..7bba7c1fbe17 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/operation_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/OperationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py index 83f3e90076f5..a32e9fd3b870 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py index 3e8cdd969711..fe508812af5e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGenerateVpnProfile.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py index 5ed4b7f01b85..65ba6a526c6c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py index a5d392fa88fd..cb5144bcd486 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealth.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py index 67f3119de55f..257f3642359e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py index fddb4b076e9a..1e521ec4bbae 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py index a4a7b34fab16..a5af724bb181 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py index c8eaa8fb8d07..5bfb4a8faa9a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py index a1280a240f0c..1a12161ed307 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayReset.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayReset.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py index d065a793e3e8..37b041c3aaca 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2SVpnGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py b/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py index 205b9f1be1f4..ab84ce61f31a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py +++ b/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py index ff937dd83f51..41228fee8f01 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py index f35b86b92b1f..2df84e262ef8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PeerExpressRouteCircuitConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py index 4a6a06425738..8d1179879956 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py index 980da871e362..0126fcb0f46d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateForManualApproval.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateForManualApproval.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py index 109ccda98f53..f8093038adbf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointCreateWithASG.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointCreateWithASG.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py index 57b8e7e95f32..4df4ff19b720 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py index d9623ed56a4e..ae786c27d8a7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py index 08b776dc8ae9..c7c3516c86ed 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py index 65c618417e43..7acd8103fc61 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py index c28a119fb5a2..52663efdf260 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointDnsZoneGroupList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py index 05c09d65f276..4b43fcb6c283 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py index feb2f154d0da..b5d924ee09e6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetForManualApproval.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetForManualApproval.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py index 5d1b91ff700f..54714f5da699 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointGetWithASG.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointGetWithASG.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py index fa200a8c9955..3268b0f1b2a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py index 1be4b25af743..75d5a512c43a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateEndpointListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateEndpointListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py index 0ae97d887cd2..7d0034f36974 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py @@ -63,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py index 99fa9aa34926..7429af6f77a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py index de49241153a9..6a4801768511 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py index 0002fcccfd65..97dd6edd21fb 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py index df77ffaf692d..b1019a66ad65 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py index 007aaca7b8d4..267913fa6f86 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py index 2ad7e1721910..bc04867c6bb3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py index 6a7016b894a4..7b93253eb1b6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py index ed9df41f253f..be94c2712e28 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py +++ b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py index ec2a886587b7..0244c1a43a36 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateCustomizedValues.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateCustomizedValues.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py index fca26f783070..e532a3de980a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDefaults.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDefaults.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py index 9abf943bc8da..06a7ecc94f8d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDns.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDns.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py index abacd9f94b53..8e2061a3ae38 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py index 057aca89995f..2ff324e0e6ba 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py index f15fff8ebc2a..36325d69555d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py index f09297657ade..7308c4dcae0b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressGetDdosProtectionStatus.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py index 5095effdd698..df76602d47ca 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py index f7756182ca58..a37db919054b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py index 8da5c3d0bed1..c7a9bf534e65 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpAddressUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpAddressUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py index d8b40c7be212..8151a33e0526 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateCustomizedValues.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py index e91dde3dde1d..233785335a57 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixCreateDefaults.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixCreateDefaults.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py index bde0f8748262..19ecda2ea09d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py index 4b04dc0be4f1..a1e4579864df 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py index b4b3c1020be5..53a36c5a9d52 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py index e9722087943e..1db5f54b15b9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py index 883c792faa32..9982ac71b4c3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/PublicIpPrefixUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/PublicIpPrefixUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py b/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py index 7981956f7e93..be75e96835f7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py +++ b/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/QueryInboundNatRulePortMapping.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py new file mode 100644 index 000000000000..be58901d5979 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_intent_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.reachability_analysis_intents.delete( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + reachability_analysis_intent_name="testAnalysisIntent", + ) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_get.py similarity index 77% rename from sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_put.py rename to sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_get.py index 4a0a1845351a..41f1fb5563ee 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_get.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-network # USAGE - python network_manager_default_admin_rule_put.py + python reachability_analysis_intent_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -30,17 +30,15 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.admin_rules.create_or_update( + response = client.reachability_analysis_intents.get( resource_group_name="rg1", network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleDefaultAdminRule", - admin_rule={"kind": "Default", "properties": {"flag": "AllowVnetInbound"}}, + workspace_name="testWorkspace", + reachability_analysis_intent_name="testAnalysisIntentName", ) print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/NetworkManagerDefaultAdminRulePut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py new file mode 100644 index 000000000000..770ede1a9b3e --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_intent_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.reachability_analysis_intents.list( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testVerifierWorkspace1", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py new file mode 100644 index 000000000000..d36fad1a958e --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py @@ -0,0 +1,58 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_intent_put.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.reachability_analysis_intents.create( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + reachability_analysis_intent_name="testAnalysisIntentName", + body={ + "properties": { + "description": "A sample reachability analysis intent", + "destinationResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", + "ipTraffic": { + "destinationIps": ["10.4.0.1"], + "destinationPorts": ["0"], + "protocols": ["Any"], + "sourceIps": ["10.4.0.0"], + "sourcePorts": ["0"], + }, + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py new file mode 100644 index 000000000000..98338138ccdd --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_run_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.reachability_analysis_runs.begin_delete( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + reachability_analysis_run_name="testAnalysisRun", + ).result() + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py new file mode 100644 index 000000000000..9554db601554 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_run_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.reachability_analysis_runs.get( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + reachability_analysis_run_name="testAnalysisRunName", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py new file mode 100644 index 000000000000..b0ce2d875cc2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_run_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.reachability_analysis_runs.list( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testVerifierWorkspace1", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py new file mode 100644 index 000000000000..bcb4b5750056 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py @@ -0,0 +1,50 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python reachability_analysis_run_put.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.reachability_analysis_runs.create( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + reachability_analysis_run_name="testAnalysisRunName", + body={ + "properties": { + "description": "A sample reachability analysis run", + "intentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py index a37b7245d947..dff6cb755699 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py index 7402c0d3826f..d259217d292b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py index b9cb2b458562..9745232d1e4f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py index c1030ae0b43c..ecbb9f6f68ea 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py index 00202b7d4290..8c6353e88ee1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py index 16cec8476138..3a06709cd996 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py index 9644e898cf09..82b0d20b837c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py index ed7fd3771544..8e0ba073af31 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py index 6bfe965a3cf7..3a803584a103 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterRuleListByRouteFilter.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py index 9cede3dfef5c..67d49579d00a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteFilterUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteFilterUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py index 9d867ea9ce73..fe133e435a0a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py index 85e30b82fcfb..23426303a016 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py index 9b754c195cf2..d9f8c7cff97e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py index 170d276f507a..471d9bed2f01 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteMapPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteMapPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py index cb6033f59dac..a0b61ff837cf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py index 16ee0cede70b..8c5c677b6921 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableCreateWithRoute.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableCreateWithRoute.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py index 69946281ea06..b72bde4fbce8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py index 2d5c46f1c50a..cabc88e89d94 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py index 45c90e6a6b83..64322935bebe 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py index abb521d02d80..ad9a76cb91af 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py index 65880117115c..5c938601a1c8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py index b4896235751d..f26bb3f84070 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py index a7a9b255aae6..5182a3e434fc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py index 07ebb397889e..42e90c1c194d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableRouteList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableRouteList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py index 165061390b9f..3476f2d425f5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RouteTableUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RouteTableUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py index 295b8d76df39..dca650a65988 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py index a072b979cc53..e950374106ff 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py index d3d7e24d9dac..64512ee8a7d5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py index b15f8cc84f0b..ff2c8653516e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/RoutingIntentPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/RoutingIntentPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py index bce01a4d98f3..55d4a6ccf587 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py index 274589141207..5714538e8a55 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py index 26d21a0cd992..de0cfd54f150 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py index 58fa9cfc0914..f202ad59f516 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py index 95b1d6eb95f6..5eb3a03ed0c7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py index 0ec13a591b65..8bfc4aedf1f9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SecurityPartnerProviderUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py index 5e75174bb2fe..7d568e2b567d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceCommunityList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceCommunityList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py index 6b7d900d355b..c163bd674572 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py index 505cbcd486d8..468f3a1f4787 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyCreateWithDefinition.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py index dd3c1dd40c23..73716cd90a9f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py index 0fe04cdd48a7..aaaca8bfe30b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py index afac81c67151..e0cc3829f66f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDefinitionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py index eeb9cff81f0c..ba6528b28224 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py index 126189e313e9..edc183be3361 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py index a1fd8aae9f6e..aecb2ef69be9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py index 5e5aeb96d249..335b22ecc4a1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py index f61615b944ef..ef812de457f2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceEndpointPolicyUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py index 0df2b020c3ad..ebe40c433d1c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResult.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResult.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py index b7c41c276fbe..198af485011e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py index 12e6fb4d0987..658f3ec6ee27 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagInformationListResultWithTagname.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagInformationListResultWithTagname.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py index e983f03c83c4..dba19d6643e8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/ServiceTagsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ServiceTagsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py new file mode 100644 index 000000000000..7f05be3b3d4d --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python static_cidrs_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.static_cidrs.create( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + static_cidr_name="TestStaticCidr", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py new file mode 100644 index 000000000000..fb38eea1e571 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python static_cidrs_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + client.static_cidrs.begin_delete( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + static_cidr_name="TestStaticCidr", + ).result() + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py new file mode 100644 index 000000000000..8b0f91fa82d1 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python static_cidrs_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.static_cidrs.get( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + static_cidr_name="TestStaticCidr", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py new file mode 100644 index 000000000000..060ac126d0b5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python static_cidrs_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.static_cidrs.list( + resource_group_name="rg1", + network_manager_name="TestNetworkManager", + pool_name="TestPool", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py index 0e3928e522a5..2caf4252cb79 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py index cf5a588d507c..c9f26f1c29b1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpoint.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py index 33fd6ac9b8d3..c2faaddc58b8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py index 03ab7efbe542..d74445efc745 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithDelegation.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithDelegation.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py index f1d29173ecd9..41606f35c53d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetCreateWithSharingScope.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateWithSharingScope.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py index e4e247f140c9..95b1532b7f6f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py index 321a49bf747d..71d709e6f68d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py index 0d43153f2d35..a00b5645ca17 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithDelegation.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithDelegation.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py index a22fc6fc8b46..fa825d8be6e4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetGetWithSharingScope.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetGetWithSharingScope.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py index 5f995b8fcbdf..697d1db9e7b2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py index bb9ef7e72105..52e03ce42c61 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetPrepareNetworkPolicies.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetPrepareNetworkPolicies.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py index 565636024d45..f8d742bd104e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py +++ b/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/SubnetUnprepareNetworkPolicies.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/usage_list.py b/sdk/network/azure-mgmt-network/generated_samples/usage_list.py index 88b5e8889076..09a5c228f358 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/usage_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py b/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py index 770eca9d82df..0ebe0376b7ec 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py +++ b/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/UsageListSpacedLocation.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/UsageListSpacedLocation.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py new file mode 100644 index 000000000000..0ff00838c1ff --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python verifier_workspace_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.verifier_workspaces.begin_delete( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + ).result() + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py new file mode 100644 index 000000000000..3666055da719 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python verifier_workspace_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.verifier_workspaces.get( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py new file mode 100644 index 000000000000..5184a5353ac9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python verifier_workspace_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.verifier_workspaces.list( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py new file mode 100644 index 000000000000..3111ccfd6071 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python verifier_workspace_patch.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.verifier_workspaces.update( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py new file mode 100644 index 000000000000..3d85105ca8b0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python verifier_workspace_put.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.verifier_workspaces.create( + resource_group_name="rg1", + network_manager_name="testNetworkManager", + workspace_name="testWorkspace", + body={"location": "eastus", "properties": {"description": "A sample workspace"}}, + ) + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py index 481bb0d75aee..6605875d9178 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py index 696a8390a6ea..69b01356af95 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py index a3cd18b673c2..626164a3097f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py index 9cbfa6df4946..ad8bf3388192 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubBgpConnectionPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubBgpConnectionPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py index c162376ffef3..9c39d1c9d9b1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py index e5bbfd1b2ac8..854dfe9bb528 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py index 286dd61e65d2..f4a992681e31 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py index 28f8f510831e..4905bbc7ae1d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py index 7ef349541b36..ed11c78e4274 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py index 18cb0fe5c318..8bcb8e4678a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubIpConfigurationPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubIpConfigurationPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py index 3ba77180e756..b19577e6ae2a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py index 8e73efac839a..890db461da64 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py index 0a0ba4f694ca..afebfa56491f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py index 55129ca388a5..4689a2be5f9d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Delete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Delete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py index b7bac8f567bb..a7391dcf02e6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Get.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Get.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py index 7c93753e6734..2fc2c6b45f79 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2List.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2List.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py index c06af4ccbf66..9db3f1c90b6e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubRouteTableV2Put.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubRouteTableV2Put.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py index e26b68c8f39b..8a15d3f2e51e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualHubUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualHubUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py index 48dbf2933658..c26690e66336 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCheckIPAddressAvailability.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py index a712251b284a..b459fffa610e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py index b3605db242ce..1cba38df473c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py index 901c178b6a81..d3b005815d42 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateServiceEndpoints.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateServiceEndpoints.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py index f4b91fa4a23a..d64393498e8e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py index 77e4d593d6c3..43aed453ec64 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py index fddfb3dcd35a..43b13ffc6ae0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateSubnetWithDelegation.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py index 41c1d47003fd..c6654d6f12a9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithBgpCommunities.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py index 145ea936beb2..40858ffef4a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkCreateWithEncryption.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithEncryption.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py new file mode 100644 index 000000000000..3f1d1a38fd51 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py @@ -0,0 +1,72 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python virtual_network_create_with_ipam_pool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.virtual_networks.begin_create_or_update( + resource_group_name="rg1", + virtual_network_name="test-vnet", + parameters={ + "location": "eastus", + "properties": { + "addressSpace": { + "ipamPoolPrefixAllocations": [ + { + "numberOfIpAddresses": "65536", + "pool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool" + }, + } + ] + }, + "subnets": [ + { + "name": "test-1", + "properties": { + "ipamPoolPrefixAllocations": [ + { + "numberOfIpAddresses": "80", + "pool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool" + }, + } + ] + }, + } + ], + }, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithIpamPool.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py index 35aa0ec2a2e8..4aba6a1a29e8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py index 7197a38df46a..4b48875e189b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py @@ -109,6 +109,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py index bf3327c52273..977387d60194 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py index 8f17657beacd..561c5c31c4c7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py index 0aa77cd61d91..9dd294e22502 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py index b4ac709dd67c..583fb57bb131 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py index 0a15cd2532a4..77e2c7fa1a03 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionReset.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py index 2d7d77916082..c956b2ba683f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py index 5d153bed548e..914fe1402870 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py index fb6807954c22..28ed1a27d46e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py index b37435c71732..9ef4cb5d6a1c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py index 3dc8db1080dc..ce779531f210 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py index a66e2b934ed6..361f14a3b9bc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py index 8f79ff3f32e2..ad74f4adfb7d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayConnectionsList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py index 8f7da11a494c..37e0cb2d2be8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py index 79fc60ed885d..53cfb39a5ffc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py index 49a36d5ced00..00523e5ecabf 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py index a570ae849dd5..bfa2cdd71247 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py new file mode 100644 index 000000000000..16ce6f5d2382 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python virtual_network_gateway_get_failover_all_tests_details.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.virtual_network_gateways.begin_get_failover_all_test_details( + resource_group_name="rg1", + virtual_network_gateway_name="ergw", + type="SingleSiteFailover", + fetch_latest="true", + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py new file mode 100644 index 000000000000..e724f5e01961 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py @@ -0,0 +1,44 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python virtual_network_gateway_get_failover_single_test_details.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.virtual_network_gateways.begin_get_failover_single_test_details( + resource_group_name="rg1", + virtual_network_gateway_name="ergw", + peering_location="Vancouver", + failover_test_id="fe458ae8-d2ae-4520-a104-44bc233bde7e", + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py index 4ce25eb88477..c691d4223ae1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py index 5478e554e630..dc2761af45e8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py index bbc2bfac57d1..af1ac5d8dfc4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py index 705495180c7a..268a2774a23b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayLearnedRoutes.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py index 49a70191fb67..9d71e60de274 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py index 05728702da09..34640b3fd2a4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py index e11ef09eb1ef..0e544bc47406 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py index e66f8e7acbf6..ca52a24738b3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayNatRuleList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py index ff2ae31a4814..880711873f4d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayReset.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayReset.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py index ddc5d9470a4b..14259c8e53da 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py index 904ddaa7969c..52edbd2dad9d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py index c570c0d34822..e10031b0c702 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py index fdc284b5e335..31b153b27531 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py new file mode 100644 index 000000000000..20ccb3eca7d5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python virtual_network_gateway_start_site_failover_simulation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.virtual_network_gateways.begin_start_express_route_site_failover_simulation( + resource_group_name="rg1", + virtual_network_gateway_name="ergw", + peering_location="Vancouver", + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py index d5193bf6ad3d..f70d40cb60dd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayStopPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py new file mode 100644 index 000000000000..df1024196e58 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py @@ -0,0 +1,50 @@ +# 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 azure.identity import DefaultAzureCredential + +from azure.mgmt.network import NetworkManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-network +# USAGE + python virtual_network_gateway_stop_site_failover_simulation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetworkManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.virtual_network_gateways.begin_stop_express_route_site_failover_simulation( + resource_group_name="rg1", + virtual_network_gateway_name="ergw", + stop_parameters={ + "details": [ + {"failoverConnectionName": "conn1", "failoverLocation": "Denver", "isVerified": False}, + {"failoverConnectionName": "conn2", "failoverLocation": "Amsterdam", "isVerified": True}, + ], + "peeringLocation": "Vancouver", + "wasSimulationSuccessful": True, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json +if __name__ == "__main__": + main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py index 99cecce4d410..e14231b13804 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py index 49ed3fd03046..3ee5e8666ad5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py @@ -104,6 +104,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py index e9781345801a..d09c6608ce23 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py index 70d53a75110b..2db88869d9e7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py index 7e037ac97d2e..d8caf9a25ba7 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py index 4663dfc03b87..0a681adab74e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGatewaysListConnections.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py index a7b4536cddf4..ca3747bff19e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py index a656dd7a9011..2218de568b1a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetDdosProtectionStatus.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py index 673d63ea1161..2df4573bbede 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetResourceNavigationLinks.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py index e8a400e88857..8772fe78d280 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetServiceAssociationLinks.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py index 17c0125bf40e..430937e36164 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithServiceAssociationLink.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py index c37dd119c6b7..9917903f0ae9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkGetWithSubnetDelegation.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py index d243501e3471..1780573a5331 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py index 7bfe996e742a..d98db06f15a0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py index e1f88f768f5c..f5c460fe6c8e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkListUsage.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkListUsage.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py index 5ce1e3492974..18ec9f147beb 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py index 05acb84f5d17..a1dd983e0452 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py index 5d1f183c4f71..d3a08d8e5cd4 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py index b43e7674b670..fbaf019cd34e 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py index 5b0abe7ec6ee..30d690c10963 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py index 4af3f15454d1..16dedaed9343 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py index 631f67bcc71b..df7b98006708 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py @@ -91,6 +91,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkScalableGatewayUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py index 4c363186109f..19d806b5ed0f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkSubnetPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkSubnetPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py index d00a07662c80..d5f62b9b9794 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapCreate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapCreate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py index 9d2b3fdb20e0..1c443db9b365 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py index 654e33e396dd..f9d61203b528 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py index 432472722cdc..a088ba0538b1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py index 3217bbe54b47..77d984a5d69b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py index c136b3d7c061..3de71a7a16f1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkTapUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkTapUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py index d20633d82ad7..7fe992db6ecd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py index e2bf55fe7b62..925ebc9f99ac 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualNetworkV6SubnetPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py index 97131afd391f..f52410b389cc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py index e796b2165bef..869b2b9da649 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py index c69bfa47ab10..37df4058c632 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py index 5415e27b0e7f..fe07cadc15cc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterListBySubscription.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py index caa6c51f8526..3e7cfd617429 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListAdvertisedRoute.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py index 538089cfc68c..a57e9bbd8f2a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeerListLearnedRoute.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py index 20cf4c0a7ee1..ba40a915e27d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py index f625ee42a11d..6ed94d97e826 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py index 93a57041593e..8692cedaa313 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py index 81516f5df431..7e20ea9a26b6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPeeringPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPeeringPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py index a7af8209df57..33bb04963805 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualRouterPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualRouterPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py index d6864562f552..030b5af3c35a 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py index 6e32bc31dfe3..ecd31d82dc64 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py index 985ac6d33e16..a20a56e41d26 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py index 84a04a58148d..dd922cf4660c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py index c7ba04d28b51..293f6dd5cf05 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py index 513278c33816..5d01ac20dd63 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWanSupportedSecurityProviders.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py index a83013dd9ff5..16c9a26dfc0d 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VirtualWANUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualWANUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py index 12c1faa0d4a5..7870bf7b1c9b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py index 24ddf7a6f122..9a0ce2bcc7f1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py index 0833542df184..fded8bb65963 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceIpConfigList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py index d5f82a85c382..41da423b227f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssNetworkInterfaceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py index 87c8352ef098..7244b3f7100f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py index 32b34f6ff60b..2ce7b394015b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssPublicIpListAll.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py index c678940aa14e..1c4b39b433bc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmNetworkInterfaceList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py index ae8b078b691e..a0109dc6f3d0 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py @@ -41,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VmssVmPublicIpList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmPublicIpList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py index 9989c3af9d09..18ea0a76f2dc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py index e77048b722de..20e1261884cc 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py index 3b20dd082674..c6365740738c 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py index a0be5c1c5d77..7d629a932164 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py index 94b1cff0c463..f0e19b3fd7c9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStartPacketCaptureFilterData.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py index cfcb0dd30e3c..dd3ca13b6be1 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnConnectionStopPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnConnectionStopPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py index a8dee6a4b713..532e9a5b72a6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py index 90edf54d0377..815f2e140b6f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py index 57dddc8d43e1..fdcd69ed5fa3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py index b35c5fc4a4e7..8c248f84e825 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py index ed9a17fd649b..cd90ed24e8c9 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py @@ -96,6 +96,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayPut.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayPut.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py index c21cf47fe421..9d28f180c1ff 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayReset.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayReset.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py index 2e780683d83b..35e31ea06c32 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py index 49570922e9d2..1e91262e66c5 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStartPacketCaptureFilterData.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py index 602dba3f1ef0..6528da80a8d6 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayStopPacketCapture.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayStopPacketCapture.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py index 9c22d07fd6b4..d3133aad0180 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnGatewayUpdateTags.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnGatewayUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py index 4c9fb92c1048..1f5dbde086a2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py index 85d1555ee9c9..2377c3905e0b 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py index 4b7f699a125f..fa52c2f08509 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py index ac542366df0a..5115fff70b14 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnServerConfigurationListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py index 5676cbe0444f..324adc89cefe 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py index c1a2ffef2298..39cb7d5f0821 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py index 9bb671c26b67..55c4f135f658 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py index a089fc8571ef..9b511675162f 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py index b090ed24ea12..adf94c662ce3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py index b50bdc73a9d5..d942446fefb2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionGetIkeSas.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py index 7540ac520fd1..eabdd6a86421 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py index 9bd951f604c4..752f73651098 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionReset.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionReset.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py index 6c0c5b1edcc9..ab1f92287fcd 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkConnectionSharedKeysGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py index 796368f6bf71..57a55fc509da 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py index 1a282c74c639..732907bbf131 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteLinkListByVpnSite.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkListByVpnSite.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py index b88ed426bce3..1f5572d490d3 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteList.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteList.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py index 1e8f476b3406..89ca3bbf95e8 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSiteListByResourceGroup.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py index 041d467d6cf2..67afe1a5da01 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py +++ b/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/VpnSitesConfigurationDownload.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSitesConfigurationDownload.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py b/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py index 588dbf051033..2eff30d7da86 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py +++ b/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListAllPolicies.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListAllPolicies.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py b/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py index b654ffeef9dc..aecb22a58116 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py +++ b/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafListPolicies.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafListPolicies.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py index 9184f4bd1c46..31fe513852ad 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py +++ b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py @@ -241,6 +241,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyCreateOrUpdate.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py index eb6955621a45..6c3a8d85eb30 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py +++ b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyDelete.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py index 76e93cef92c5..5c8224fe22b2 100644 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py +++ b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/examples/WafPolicyGet.json +# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/WafPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/network/azure-mgmt-network/generated_tests/conftest.py b/sdk/network/azure-mgmt-network/generated_tests/conftest.py index 3d2adeabd511..38fcfca2a5bc 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/conftest.py +++ b/sdk/network/azure-mgmt-network/generated_tests/conftest.py @@ -18,7 +18,7 @@ load_dotenv() -# aovid record sensitive identity information in recordings +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): networkmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management.py index d65d71240d1d..530ba4e64d70 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management.py @@ -34,7 +34,7 @@ def test_begin_put_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result result = [r for r in response] # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_begin_delete_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,7 +69,7 @@ def test_begin_delete_bastion_shareable_link_by_token(self, resource_group): resource_group_name=resource_group.name, bastion_host_name="str", bsl_token_request={"tokens": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_get_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -103,7 +103,7 @@ def test_begin_get_active_sessions(self, resource_group): response = self.client.begin_get_active_sessions( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result result = [r for r in response] # please add some check logic here by yourself @@ -116,7 +116,7 @@ def test_disconnect_active_sessions(self, resource_group): resource_group_name=resource_group.name, bastion_host_name="str", session_ids={"sessionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -128,7 +128,7 @@ def test_check_dns_name_availability(self, resource_group): response = self.client.check_dns_name_availability( location="str", domain_name_label="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -139,7 +139,7 @@ def test_check_dns_name_availability(self, resource_group): def test_express_route_provider_port(self, resource_group): response = self.client.express_route_provider_port( providerport="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -152,7 +152,7 @@ def test_list_active_connectivity_configurations(self, resource_group): resource_group_name=resource_group.name, network_manager_name="str", parameters={"regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -165,7 +165,7 @@ def test_list_active_security_admin_rules(self, resource_group): resource_group_name=resource_group.name, network_manager_name="str", parameters={"regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -178,7 +178,7 @@ def test_list_network_manager_effective_connectivity_configurations(self, resour resource_group_name=resource_group.name, virtual_network_name="str", parameters={"skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -191,7 +191,7 @@ def test_list_network_manager_effective_security_admin_rules(self, resource_grou resource_group_name=resource_group.name, virtual_network_name="str", parameters={"skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -203,7 +203,7 @@ def test_supported_security_providers(self, resource_group): response = self.client.supported_security_providers( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -216,7 +216,7 @@ def test_begin_generatevirtualwanvpnserverconfigurationvpnprofile(self, resource resource_group_name=resource_group.name, virtual_wan_name="str", vpn_client_params={"authenticationMethod": "str", "vpnServerConfigurationResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations.py index a4023a1ce14e..42ee827f8a36 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_admin_rule_collections_list(self, resource_group): response = self.client.admin_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_admin_rule_collections_get(self, resource_group): response = self.client.admin_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_admin_rule_collections_create_or_update(self, resource_group): response = self.client.admin_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -71,7 +71,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -79,13 +79,13 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_admin_rule_collections_begin_delete(self, resource_group): response = self.client.admin_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations_async.py index 8d5385b51983..375d1b8c4f08 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rule_collections_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_admin_rule_collections_list(self, resource_group): response = self.client.admin_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,13 +34,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_admin_rule_collections_get(self, resource_group): response = await self.client.admin_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -48,7 +48,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_admin_rule_collections_create_or_update(self, resource_group): response = await self.client.admin_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -72,7 +72,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -80,14 +80,14 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_admin_rule_collections_begin_delete(self, resource_group): response = await ( await self.client.admin_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations.py index cc7acc7e5822..984b0ca2ab12 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_admin_rules_list(self, resource_group): response = self.client.admin_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,14 +34,14 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_admin_rules_get(self, resource_group): response = self.client.admin_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_admin_rules_create_or_update(self, resource_group): response = self.client.admin_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -82,7 +82,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -90,14 +90,14 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_admin_rules_begin_delete(self, resource_group): response = self.client.admin_rules.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations_async.py index 473f5fa7aec4..454e6fc9fd73 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_admin_rules_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_admin_rules_list(self, resource_group): response = self.client.admin_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,14 +35,14 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_admin_rules_get(self, resource_group): response = await self.client.admin_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_admin_rules_create_or_update(self, resource_group): response = await self.client.admin_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -83,7 +83,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -91,7 +91,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_admin_rules_begin_delete(self, resource_group): response = await ( await self.client.admin_rules.begin_delete( resource_group_name=resource_group.name, @@ -99,7 +99,7 @@ async def test_begin_delete(self, resource_group): configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations.py index 1e68e243b783..d6cac16c63bd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_application_gateway_private_endpoint_connections_begin_delete(self, resource_group): response = self.client.application_gateway_private_endpoint_connections.begin_delete( resource_group_name=resource_group.name, application_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_application_gateway_private_endpoint_connections_begin_update(self, resource_group): response = self.client.application_gateway_private_endpoint_connections.begin_update( resource_group_name=resource_group.name, application_gateway_name="str", @@ -94,6 +94,7 @@ def test_begin_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -269,6 +270,13 @@ def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -636,6 +644,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -951,6 +966,13 @@ def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1325,6 +1347,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1827,6 +1856,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2048,6 +2084,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2364,6 +2407,13 @@ def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2732,6 +2782,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3084,6 +3141,13 @@ def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3455,6 +3519,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3855,6 +3926,13 @@ def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4225,6 +4303,13 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4596,6 +4681,9 @@ def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4687,6 +4775,7 @@ def test_begin_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5527,7 +5616,7 @@ def test_begin_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -5535,12 +5624,12 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_application_gateway_private_endpoint_connections_get(self, resource_group): response = self.client.application_gateway_private_endpoint_connections.get( resource_group_name=resource_group.name, application_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -5548,11 +5637,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_application_gateway_private_endpoint_connections_list(self, resource_group): response = self.client.application_gateway_private_endpoint_connections.list( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations_async.py index 8df9da9beaf5..991d3ec6485c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_endpoint_connections_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_application_gateway_private_endpoint_connections_begin_delete(self, resource_group): response = await ( await self.client.application_gateway_private_endpoint_connections.begin_delete( resource_group_name=resource_group.name, application_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,7 +36,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_application_gateway_private_endpoint_connections_begin_update(self, resource_group): response = await ( await self.client.application_gateway_private_endpoint_connections.begin_update( resource_group_name=resource_group.name, @@ -98,6 +98,7 @@ async def test_begin_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -276,6 +277,13 @@ async def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -643,6 +651,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -958,6 +973,13 @@ async def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1332,6 +1354,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1837,6 +1866,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2058,6 +2094,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2374,6 +2417,13 @@ async def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2745,6 +2795,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3097,6 +3154,13 @@ async def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3471,6 +3535,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3876,6 +3947,13 @@ async def test_begin_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4249,6 +4327,13 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4620,6 +4705,9 @@ async def test_begin_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4713,6 +4801,7 @@ async def test_begin_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5566,7 +5655,7 @@ async def test_begin_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -5575,12 +5664,12 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_application_gateway_private_endpoint_connections_get(self, resource_group): response = await self.client.application_gateway_private_endpoint_connections.get( resource_group_name=resource_group.name, application_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -5588,11 +5677,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_application_gateway_private_endpoint_connections_list(self, resource_group): response = self.client.application_gateway_private_endpoint_connections.list( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations.py index 1fdf344e4bf2..c48b7349aa35 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_application_gateway_private_link_resources_list(self, resource_group): response = self.client.application_gateway_private_link_resources.list( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations_async.py index 9d947914777f..740a060271a7 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_private_link_resources_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_application_gateway_private_link_resources_list(self, resource_group): response = self.client.application_gateway_private_link_resources.list( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations.py index 555161a3769b..df3f871ea8b1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_application_gateway_waf_dynamic_manifests_default_get(self, resource_group): response = self.client.application_gateway_waf_dynamic_manifests_default.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations_async.py index 925ec28c15b6..83f1429fe100 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_default_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_application_gateway_waf_dynamic_manifests_default_get(self, resource_group): response = await self.client.application_gateway_waf_dynamic_manifests_default.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations.py index 3b4387c85405..f159ae23bb9f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_application_gateway_waf_dynamic_manifests_get(self, resource_group): response = self.client.application_gateway_waf_dynamic_manifests.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations_async.py index cd7c062e2482..2454207acbd1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateway_waf_dynamic_manifests_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_application_gateway_waf_dynamic_manifests_get(self, resource_group): response = self.client.application_gateway_waf_dynamic_manifests.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations.py index ed7168684d3e..4bcd3c7388c8 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_application_gateways_begin_delete(self, resource_group): response = self.client.application_gateways.begin_delete( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_application_gateways_get(self, resource_group): response = self.client.application_gateways.get( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_application_gateways_begin_create_or_update(self, resource_group): response = self.client.application_gateways.begin_create_or_update( resource_group_name=resource_group.name, application_gateway_name="str", @@ -209,6 +209,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -302,6 +309,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -695,6 +703,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1229,6 +1238,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1322,6 +1334,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1826,6 +1839,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2421,6 +2435,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2517,6 +2538,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2870,6 +2892,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3369,6 +3392,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3462,6 +3492,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3804,6 +3835,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4383,6 +4415,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4561,6 +4594,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4931,6 +4971,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5246,6 +5293,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5625,6 +5679,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6133,6 +6194,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6354,6 +6422,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6670,6 +6745,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7044,6 +7126,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7396,6 +7485,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7770,6 +7866,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8180,6 +8283,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8553,6 +8663,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8930,6 +9047,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9023,6 +9143,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10125,7 +10246,7 @@ def test_begin_create_or_update(self, resource_group): }, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -10133,12 +10254,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_application_gateways_update_tags(self, resource_group): response = self.client.application_gateways.update_tags( resource_group_name=resource_group.name, application_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10146,10 +10267,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_application_gateways_list(self, resource_group): response = self.client.application_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -10157,9 +10278,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_application_gateways_list_all(self, resource_group): response = self.client.application_gateways.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -10167,11 +10288,11 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start(self, resource_group): + def test_application_gateways_begin_start(self, resource_group): response = self.client.application_gateways.begin_start( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -10179,11 +10300,11 @@ def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop(self, resource_group): + def test_application_gateways_begin_stop(self, resource_group): response = self.client.application_gateways.begin_stop( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -10191,11 +10312,11 @@ def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_backend_health(self, resource_group): + def test_application_gateways_begin_backend_health(self, resource_group): response = self.client.application_gateways.begin_backend_health( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -10203,7 +10324,7 @@ def test_begin_backend_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_backend_health_on_demand(self, resource_group): + def test_application_gateways_begin_backend_health_on_demand(self, resource_group): response = self.client.application_gateways.begin_backend_health_on_demand( resource_group_name=resource_group.name, application_gateway_name="str", @@ -10217,7 +10338,7 @@ def test_begin_backend_health_on_demand(self, resource_group): "protocol": "str", "timeout": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -10225,9 +10346,9 @@ def test_begin_backend_health_on_demand(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_server_variables(self, resource_group): + def test_application_gateways_list_available_server_variables(self, resource_group): response = self.client.application_gateways.list_available_server_variables( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10235,9 +10356,9 @@ def test_list_available_server_variables(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_request_headers(self, resource_group): + def test_application_gateways_list_available_request_headers(self, resource_group): response = self.client.application_gateways.list_available_request_headers( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10245,9 +10366,9 @@ def test_list_available_request_headers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_response_headers(self, resource_group): + def test_application_gateways_list_available_response_headers(self, resource_group): response = self.client.application_gateways.list_available_response_headers( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10255,9 +10376,9 @@ def test_list_available_response_headers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_waf_rule_sets(self, resource_group): + def test_application_gateways_list_available_waf_rule_sets(self, resource_group): response = self.client.application_gateways.list_available_waf_rule_sets( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10265,9 +10386,9 @@ def test_list_available_waf_rule_sets(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_ssl_options(self, resource_group): + def test_application_gateways_list_available_ssl_options(self, resource_group): response = self.client.application_gateways.list_available_ssl_options( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10275,9 +10396,9 @@ def test_list_available_ssl_options(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_ssl_predefined_policies(self, resource_group): + def test_application_gateways_list_available_ssl_predefined_policies(self, resource_group): response = self.client.application_gateways.list_available_ssl_predefined_policies( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -10285,10 +10406,10 @@ def test_list_available_ssl_predefined_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_ssl_predefined_policy(self, resource_group): + def test_application_gateways_get_ssl_predefined_policy(self, resource_group): response = self.client.application_gateways.get_ssl_predefined_policy( predefined_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations_async.py index 71b5aad0a28d..6d1a1c618b1f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_gateways_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_application_gateways_begin_delete(self, resource_group): response = await ( await self.client.application_gateways.begin_delete( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_application_gateways_get(self, resource_group): response = await self.client.application_gateways.get( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_application_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.application_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -217,6 +217,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -310,6 +317,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -703,6 +711,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1237,6 +1246,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1330,6 +1346,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1837,6 +1854,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2440,6 +2458,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2539,6 +2564,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2897,6 +2923,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3408,6 +3435,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3501,6 +3535,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3848,6 +3883,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4437,6 +4473,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4620,6 +4657,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4993,6 +5037,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5308,6 +5359,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5696,6 +5754,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6204,6 +6269,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6425,6 +6497,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6744,6 +6823,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7118,6 +7204,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7473,6 +7566,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7852,6 +7952,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8269,6 +8376,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8647,6 +8761,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9027,6 +9148,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9120,6 +9244,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10232,7 +10357,7 @@ async def test_begin_create_or_update(self, resource_group): }, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -10241,12 +10366,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_application_gateways_update_tags(self, resource_group): response = await self.client.application_gateways.update_tags( resource_group_name=resource_group.name, application_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10254,10 +10379,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_application_gateways_list(self, resource_group): response = self.client.application_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -10265,9 +10390,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_application_gateways_list_all(self, resource_group): response = self.client.application_gateways.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -10275,12 +10400,12 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start(self, resource_group): + async def test_application_gateways_begin_start(self, resource_group): response = await ( await self.client.application_gateways.begin_start( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -10289,12 +10414,12 @@ async def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop(self, resource_group): + async def test_application_gateways_begin_stop(self, resource_group): response = await ( await self.client.application_gateways.begin_stop( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -10303,12 +10428,12 @@ async def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_backend_health(self, resource_group): + async def test_application_gateways_begin_backend_health(self, resource_group): response = await ( await self.client.application_gateways.begin_backend_health( resource_group_name=resource_group.name, application_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -10317,7 +10442,7 @@ async def test_begin_backend_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_backend_health_on_demand(self, resource_group): + async def test_application_gateways_begin_backend_health_on_demand(self, resource_group): response = await ( await self.client.application_gateways.begin_backend_health_on_demand( resource_group_name=resource_group.name, @@ -10332,7 +10457,7 @@ async def test_begin_backend_health_on_demand(self, resource_group): "protocol": "str", "timeout": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -10341,9 +10466,9 @@ async def test_begin_backend_health_on_demand(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_server_variables(self, resource_group): + async def test_application_gateways_list_available_server_variables(self, resource_group): response = await self.client.application_gateways.list_available_server_variables( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10351,9 +10476,9 @@ async def test_list_available_server_variables(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_request_headers(self, resource_group): + async def test_application_gateways_list_available_request_headers(self, resource_group): response = await self.client.application_gateways.list_available_request_headers( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10361,9 +10486,9 @@ async def test_list_available_request_headers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_response_headers(self, resource_group): + async def test_application_gateways_list_available_response_headers(self, resource_group): response = await self.client.application_gateways.list_available_response_headers( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10371,9 +10496,9 @@ async def test_list_available_response_headers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_waf_rule_sets(self, resource_group): + async def test_application_gateways_list_available_waf_rule_sets(self, resource_group): response = await self.client.application_gateways.list_available_waf_rule_sets( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10381,9 +10506,9 @@ async def test_list_available_waf_rule_sets(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_ssl_options(self, resource_group): + async def test_application_gateways_list_available_ssl_options(self, resource_group): response = await self.client.application_gateways.list_available_ssl_options( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10391,9 +10516,9 @@ async def test_list_available_ssl_options(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_ssl_predefined_policies(self, resource_group): + async def test_application_gateways_list_available_ssl_predefined_policies(self, resource_group): response = self.client.application_gateways.list_available_ssl_predefined_policies( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -10401,10 +10526,10 @@ async def test_list_available_ssl_predefined_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_ssl_predefined_policy(self, resource_group): + async def test_application_gateways_get_ssl_predefined_policy(self, resource_group): response = await self.client.application_gateways.get_ssl_predefined_policy( predefined_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations.py index e1ae87aa4e51..131da801e479 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_application_security_groups_begin_delete(self, resource_group): response = self.client.application_security_groups.begin_delete( resource_group_name=resource_group.name, application_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_application_security_groups_get(self, resource_group): response = self.client.application_security_groups.get( resource_group_name=resource_group.name, application_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_application_security_groups_begin_create_or_update(self, resource_group): response = self.client.application_security_groups.begin_create_or_update( resource_group_name=resource_group.name, application_security_group_name="str", @@ -58,7 +58,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -66,12 +66,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_application_security_groups_update_tags(self, resource_group): response = self.client.application_security_groups.update_tags( resource_group_name=resource_group.name, application_security_group_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -79,9 +79,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_application_security_groups_list_all(self, resource_group): response = self.client.application_security_groups.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -89,10 +89,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_application_security_groups_list(self, resource_group): response = self.client.application_security_groups.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations_async.py index 28ffa54a5b68..69712dffc349 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_application_security_groups_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_application_security_groups_begin_delete(self, resource_group): response = await ( await self.client.application_security_groups.begin_delete( resource_group_name=resource_group.name, application_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_application_security_groups_get(self, resource_group): response = await self.client.application_security_groups.get( resource_group_name=resource_group.name, application_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_application_security_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.application_security_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -62,7 +62,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -71,12 +71,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_application_security_groups_update_tags(self, resource_group): response = await self.client.application_security_groups.update_tags( resource_group_name=resource_group.name, application_security_group_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -84,9 +84,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_application_security_groups_list_all(self, resource_group): response = self.client.application_security_groups.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -94,10 +94,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_application_security_groups_list(self, resource_group): response = self.client.application_security_groups.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_async.py index 2b415e42bba5..56d21a5a2fa1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_async.py @@ -42,7 +42,7 @@ async def test_begin_put_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result result = [r async for r in response] @@ -72,7 +72,7 @@ async def test_begin_delete_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -87,7 +87,7 @@ async def test_begin_delete_bastion_shareable_link_by_token(self, resource_group resource_group_name=resource_group.name, bastion_host_name="str", bsl_token_request={"tokens": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_get_bastion_shareable_link(self, resource_group): } ] }, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -123,7 +123,7 @@ async def test_begin_get_active_sessions(self, resource_group): await self.client.begin_get_active_sessions( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result result = [r async for r in response] @@ -137,7 +137,7 @@ async def test_disconnect_active_sessions(self, resource_group): resource_group_name=resource_group.name, bastion_host_name="str", session_ids={"sessionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -149,7 +149,7 @@ async def test_check_dns_name_availability(self, resource_group): response = await self.client.check_dns_name_availability( location="str", domain_name_label="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -160,7 +160,7 @@ async def test_check_dns_name_availability(self, resource_group): async def test_express_route_provider_port(self, resource_group): response = await self.client.express_route_provider_port( providerport="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -173,7 +173,7 @@ async def test_list_active_connectivity_configurations(self, resource_group): resource_group_name=resource_group.name, network_manager_name="str", parameters={"regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -186,7 +186,7 @@ async def test_list_active_security_admin_rules(self, resource_group): resource_group_name=resource_group.name, network_manager_name="str", parameters={"regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -199,7 +199,7 @@ async def test_list_network_manager_effective_connectivity_configurations(self, resource_group_name=resource_group.name, virtual_network_name="str", parameters={"skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -212,7 +212,7 @@ async def test_list_network_manager_effective_security_admin_rules(self, resourc resource_group_name=resource_group.name, virtual_network_name="str", parameters={"skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -224,7 +224,7 @@ async def test_supported_security_providers(self, resource_group): response = await self.client.supported_security_providers( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -238,7 +238,7 @@ async def test_begin_generatevirtualwanvpnserverconfigurationvpnprofile(self, re resource_group_name=resource_group.name, virtual_wan_name="str", vpn_client_params={"authenticationMethod": "str", "vpnServerConfigurationResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations.py index 21ac32e4f715..2151f855581f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_available_delegations_list(self, resource_group): response = self.client.available_delegations.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations_async.py index 50a402481501..db17529e4210 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_delegations_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_available_delegations_list(self, resource_group): response = self.client.available_delegations.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations.py index d70a2128f93e..1dad8b627a4a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_available_endpoint_services_list(self, resource_group): response = self.client.available_endpoint_services.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations_async.py index fa2136434fd9..adcc2f7225fe 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_endpoint_services_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_available_endpoint_services_list(self, resource_group): response = self.client.available_endpoint_services.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations.py index 438842f02e35..f762f8bf6422 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_available_private_endpoint_types_list(self, resource_group): response = self.client.available_private_endpoint_types.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -31,11 +31,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_available_private_endpoint_types_list_by_resource_group(self, resource_group): response = self.client.available_private_endpoint_types.list_by_resource_group( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations_async.py index f6abfd67fcee..bb61b7d2e128 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_private_endpoint_types_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_available_private_endpoint_types_list(self, resource_group): response = self.client.available_private_endpoint_types.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -32,11 +32,11 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_available_private_endpoint_types_list_by_resource_group(self, resource_group): response = self.client.available_private_endpoint_types.list_by_resource_group( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations.py index a5fefadd6559..ae7da5f0e1d0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_available_resource_group_delegations_list(self, resource_group): response = self.client.available_resource_group_delegations.list( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations_async.py index 42e33d6ec9a6..0c7046a0d25e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_resource_group_delegations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_available_resource_group_delegations_list(self, resource_group): response = self.client.available_resource_group_delegations.list( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations.py index d1c4d03ecf28..7de2c15f4ad9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_available_service_aliases_list(self, resource_group): response = self.client.available_service_aliases.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -31,11 +31,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_available_service_aliases_list_by_resource_group(self, resource_group): response = self.client.available_service_aliases.list_by_resource_group( resource_group_name=resource_group.name, location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations_async.py index c6fda1a5193f..aa711cf91de8 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_available_service_aliases_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_available_service_aliases_list(self, resource_group): response = self.client.available_service_aliases.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -32,11 +32,11 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_available_service_aliases_list_by_resource_group(self, resource_group): response = self.client.available_service_aliases.list_by_resource_group( resource_group_name=resource_group.name, location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations.py index 0d8a6ce183ec..e512e1cb938d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_azure_firewall_fqdn_tags_list_all(self, resource_group): response = self.client.azure_firewall_fqdn_tags.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations_async.py index 2a743151b9ea..2a537758e348 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewall_fqdn_tags_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_azure_firewall_fqdn_tags_list_all(self, resource_group): response = self.client.azure_firewall_fqdn_tags.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations.py index 9f2e33799834..00127525f94e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_azure_firewalls_begin_delete(self, resource_group): response = self.client.azure_firewalls.begin_delete( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_azure_firewalls_get(self, resource_group): response = self.client.azure_firewalls.get( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_azure_firewalls_begin_create_or_update(self, resource_group): response = self.client.azure_firewalls.begin_create_or_update( resource_group_name=resource_group.name, azure_firewall_name="str", @@ -158,7 +158,7 @@ def test_begin_create_or_update(self, resource_group): "virtualHub": {"id": "str"}, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -166,12 +166,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_azure_firewalls_begin_update_tags(self, resource_group): response = self.client.azure_firewalls.begin_update_tags( resource_group_name=resource_group.name, azure_firewall_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -179,10 +179,10 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_azure_firewalls_list(self, resource_group): response = self.client.azure_firewalls.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -190,9 +190,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_azure_firewalls_list_all(self, resource_group): response = self.client.azure_firewalls.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -200,11 +200,11 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_learned_prefixes(self, resource_group): + def test_azure_firewalls_begin_list_learned_prefixes(self, resource_group): response = self.client.azure_firewalls.begin_list_learned_prefixes( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -212,7 +212,7 @@ def test_begin_list_learned_prefixes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_packet_capture(self, resource_group): + def test_azure_firewalls_begin_packet_capture(self, resource_group): response = self.client.azure_firewalls.begin_packet_capture( resource_group_name=resource_group.name, azure_firewall_name="str", @@ -225,7 +225,7 @@ def test_begin_packet_capture(self, resource_group): "protocol": "str", "sasUrl": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations_async.py index 448b6582f88f..ee6b8d066212 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_azure_firewalls_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_azure_firewalls_begin_delete(self, resource_group): response = await ( await self.client.azure_firewalls.begin_delete( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_azure_firewalls_get(self, resource_group): response = await self.client.azure_firewalls.get( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_azure_firewalls_begin_create_or_update(self, resource_group): response = await ( await self.client.azure_firewalls.begin_create_or_update( resource_group_name=resource_group.name, @@ -162,7 +162,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualHub": {"id": "str"}, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -171,13 +171,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_azure_firewalls_begin_update_tags(self, resource_group): response = await ( await self.client.azure_firewalls.begin_update_tags( resource_group_name=resource_group.name, azure_firewall_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -186,10 +186,10 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_azure_firewalls_list(self, resource_group): response = self.client.azure_firewalls.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -197,9 +197,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_azure_firewalls_list_all(self, resource_group): response = self.client.azure_firewalls.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -207,12 +207,12 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_learned_prefixes(self, resource_group): + async def test_azure_firewalls_begin_list_learned_prefixes(self, resource_group): response = await ( await self.client.azure_firewalls.begin_list_learned_prefixes( resource_group_name=resource_group.name, azure_firewall_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -221,7 +221,7 @@ async def test_begin_list_learned_prefixes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_packet_capture(self, resource_group): + async def test_azure_firewalls_begin_packet_capture(self, resource_group): response = await ( await self.client.azure_firewalls.begin_packet_capture( resource_group_name=resource_group.name, @@ -235,7 +235,7 @@ async def test_begin_packet_capture(self, resource_group): "protocol": "str", "sasUrl": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations.py index 734e5520633d..248b981223be 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_bastion_hosts_begin_delete(self, resource_group): response = self.client.bastion_hosts.begin_delete( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_bastion_hosts_get(self, resource_group): response = self.client.bastion_hosts.get( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_bastion_hosts_begin_create_or_update(self, resource_group): response = self.client.bastion_hosts.begin_create_or_update( resource_group_name=resource_group.name, bastion_host_name="str", @@ -54,6 +54,7 @@ def test_begin_create_or_update(self, resource_group): "enableFileCopy": False, "enableIpConnect": False, "enableKerberos": False, + "enablePrivateOnlyBastion": False, "enableSessionRecording": False, "enableShareableLink": False, "enableTunneling": False, @@ -82,7 +83,7 @@ def test_begin_create_or_update(self, resource_group): "virtualNetwork": {"id": "str"}, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -90,12 +91,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_bastion_hosts_begin_update_tags(self, resource_group): response = self.client.bastion_hosts.begin_update_tags( resource_group_name=resource_group.name, bastion_host_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -103,9 +104,9 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_bastion_hosts_list(self, resource_group): response = self.client.bastion_hosts.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -113,10 +114,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_bastion_hosts_list_by_resource_group(self, resource_group): response = self.client.bastion_hosts.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations_async.py index 9f717ef4060e..877d5f8e664e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bastion_hosts_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_bastion_hosts_begin_delete(self, resource_group): response = await ( await self.client.bastion_hosts.begin_delete( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_bastion_hosts_get(self, resource_group): response = await self.client.bastion_hosts.get( resource_group_name=resource_group.name, bastion_host_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_bastion_hosts_begin_create_or_update(self, resource_group): response = await ( await self.client.bastion_hosts.begin_create_or_update( resource_group_name=resource_group.name, @@ -58,6 +58,7 @@ async def test_begin_create_or_update(self, resource_group): "enableFileCopy": False, "enableIpConnect": False, "enableKerberos": False, + "enablePrivateOnlyBastion": False, "enableSessionRecording": False, "enableShareableLink": False, "enableTunneling": False, @@ -86,7 +87,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualNetwork": {"id": "str"}, "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -95,13 +96,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_bastion_hosts_begin_update_tags(self, resource_group): response = await ( await self.client.bastion_hosts.begin_update_tags( resource_group_name=resource_group.name, bastion_host_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -110,9 +111,9 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_bastion_hosts_list(self, resource_group): response = self.client.bastion_hosts.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -120,10 +121,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_bastion_hosts_list_by_resource_group(self, resource_group): response = self.client.bastion_hosts.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations.py index 38672977d358..b2fbb41b7aa3 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_bgp_service_communities_list(self, resource_group): response = self.client.bgp_service_communities.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations_async.py index c94971a76cb4..40e3b91403ff 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_bgp_service_communities_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_bgp_service_communities_list(self, resource_group): response = self.client.bgp_service_communities.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations.py index 85e6f212ae45..560cb26723af 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_configuration_policy_groups_begin_create_or_update(self, resource_group): response = self.client.configuration_policy_groups.begin_create_or_update( resource_group_name=resource_group.name, vpn_server_configuration_name="str", @@ -36,7 +36,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -44,12 +44,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_configuration_policy_groups_begin_delete(self, resource_group): response = self.client.configuration_policy_groups.begin_delete( resource_group_name=resource_group.name, vpn_server_configuration_name="str", configuration_policy_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -57,12 +57,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_configuration_policy_groups_get(self, resource_group): response = self.client.configuration_policy_groups.get( resource_group_name=resource_group.name, vpn_server_configuration_name="str", configuration_policy_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -70,11 +70,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_vpn_server_configuration(self, resource_group): + def test_configuration_policy_groups_list_by_vpn_server_configuration(self, resource_group): response = self.client.configuration_policy_groups.list_by_vpn_server_configuration( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations_async.py index b29694823697..3918ccadd2e2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_configuration_policy_groups_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_configuration_policy_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.configuration_policy_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -38,7 +38,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -47,13 +47,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_configuration_policy_groups_begin_delete(self, resource_group): response = await ( await self.client.configuration_policy_groups.begin_delete( resource_group_name=resource_group.name, vpn_server_configuration_name="str", configuration_policy_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -62,12 +62,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_configuration_policy_groups_get(self, resource_group): response = await self.client.configuration_policy_groups.get( resource_group_name=resource_group.name, vpn_server_configuration_name="str", configuration_policy_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -75,11 +75,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_vpn_server_configuration(self, resource_group): + async def test_configuration_policy_groups_list_by_vpn_server_configuration(self, resource_group): response = self.client.configuration_policy_groups.list_by_vpn_server_configuration( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations.py index 64217e9451f0..853ba0de1a99 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_connection_monitors_begin_create_or_update(self, resource_group): response = self.client.connection_monitors.begin_create_or_update( resource_group_name=resource_group.name, network_watcher_name="str", @@ -76,7 +76,7 @@ def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -84,12 +84,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_connection_monitors_get(self, resource_group): response = self.client.connection_monitors.get( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -97,12 +97,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_connection_monitors_begin_delete(self, resource_group): response = self.client.connection_monitors.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -110,13 +110,13 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_connection_monitors_update_tags(self, resource_group): response = self.client.connection_monitors.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -124,12 +124,12 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop(self, resource_group): + def test_connection_monitors_begin_stop(self, resource_group): response = self.client.connection_monitors.begin_stop( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -137,12 +137,12 @@ def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start(self, resource_group): + def test_connection_monitors_begin_start(self, resource_group): response = self.client.connection_monitors.begin_start( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -150,12 +150,12 @@ def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_query(self, resource_group): + def test_connection_monitors_begin_query(self, resource_group): response = self.client.connection_monitors.begin_query( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -163,11 +163,11 @@ def test_begin_query(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_connection_monitors_list(self, resource_group): response = self.client.connection_monitors.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations_async.py index f52e6ee564c5..f20b70c77e5c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connection_monitors_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_connection_monitors_begin_create_or_update(self, resource_group): response = await ( await self.client.connection_monitors.begin_create_or_update( resource_group_name=resource_group.name, @@ -82,7 +82,7 @@ async def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -91,12 +91,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_connection_monitors_get(self, resource_group): response = await self.client.connection_monitors.get( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -104,13 +104,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_connection_monitors_begin_delete(self, resource_group): response = await ( await self.client.connection_monitors.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -119,13 +119,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_connection_monitors_update_tags(self, resource_group): response = await self.client.connection_monitors.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -133,13 +133,13 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop(self, resource_group): + async def test_connection_monitors_begin_stop(self, resource_group): response = await ( await self.client.connection_monitors.begin_stop( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -148,13 +148,13 @@ async def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start(self, resource_group): + async def test_connection_monitors_begin_start(self, resource_group): response = await ( await self.client.connection_monitors.begin_start( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -163,13 +163,13 @@ async def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_query(self, resource_group): + async def test_connection_monitors_begin_query(self, resource_group): response = await ( await self.client.connection_monitors.begin_query( resource_group_name=resource_group.name, network_watcher_name="str", connection_monitor_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -178,11 +178,11 @@ async def test_begin_query(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_connection_monitors_list(self, resource_group): response = self.client.connection_monitors.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations.py index 98441d11e85f..570bb2ebb473 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_connectivity_configurations_get(self, resource_group): response = self.client.connectivity_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_connectivity_configurations_create_or_update(self, resource_group): response = self.client.connectivity_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -62,7 +62,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -70,12 +70,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_connectivity_configurations_begin_delete(self, resource_group): response = self.client.connectivity_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -83,11 +83,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_connectivity_configurations_list(self, resource_group): response = self.client.connectivity_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations_async.py index ae8297da8b69..7210647ed2e9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_connectivity_configurations_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_connectivity_configurations_get(self, resource_group): response = await self.client.connectivity_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_connectivity_configurations_create_or_update(self, resource_group): response = await self.client.connectivity_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -63,7 +63,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -71,13 +71,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_connectivity_configurations_begin_delete(self, resource_group): response = await ( await self.client.connectivity_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -86,11 +86,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_connectivity_configurations_list(self, resource_group): response = self.client.connectivity_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations.py index 995b92b05629..13e1fbc081f5 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_custom_ip_prefixes_begin_delete(self, resource_group): response = self.client.custom_ip_prefixes.begin_delete( resource_group_name=resource_group.name, custom_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_custom_ip_prefixes_get(self, resource_group): response = self.client.custom_ip_prefixes.get( resource_group_name=resource_group.name, custom_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_custom_ip_prefixes_begin_create_or_update(self, resource_group): response = self.client.custom_ip_prefixes.begin_create_or_update( resource_group_name=resource_group.name, custom_ip_prefix_name="str", @@ -73,7 +73,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,12 +81,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_custom_ip_prefixes_update_tags(self, resource_group): response = self.client.custom_ip_prefixes.update_tags( resource_group_name=resource_group.name, custom_ip_prefix_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -94,9 +94,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_custom_ip_prefixes_list_all(self, resource_group): response = self.client.custom_ip_prefixes.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -104,10 +104,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_custom_ip_prefixes_list(self, resource_group): response = self.client.custom_ip_prefixes.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations_async.py index da8b6f98849c..8e6551d050ec 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_custom_ip_prefixes_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_custom_ip_prefixes_begin_delete(self, resource_group): response = await ( await self.client.custom_ip_prefixes.begin_delete( resource_group_name=resource_group.name, custom_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_custom_ip_prefixes_get(self, resource_group): response = await self.client.custom_ip_prefixes.get( resource_group_name=resource_group.name, custom_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_custom_ip_prefixes_begin_create_or_update(self, resource_group): response = await ( await self.client.custom_ip_prefixes.begin_create_or_update( resource_group_name=resource_group.name, @@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -86,12 +86,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_custom_ip_prefixes_update_tags(self, resource_group): response = await self.client.custom_ip_prefixes.update_tags( resource_group_name=resource_group.name, custom_ip_prefix_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -99,9 +99,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_custom_ip_prefixes_list_all(self, resource_group): response = self.client.custom_ip_prefixes.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -109,10 +109,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_custom_ip_prefixes_list(self, resource_group): response = self.client.custom_ip_prefixes.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations.py index 49d660575df9..e9d46f7ea08f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_ddos_custom_policies_begin_delete(self, resource_group): response = self.client.ddos_custom_policies.begin_delete( resource_group_name=resource_group.name, ddos_custom_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_ddos_custom_policies_get(self, resource_group): response = self.client.ddos_custom_policies.get( resource_group_name=resource_group.name, ddos_custom_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_ddos_custom_policies_begin_create_or_update(self, resource_group): response = self.client.ddos_custom_policies.begin_create_or_update( resource_group_name=resource_group.name, ddos_custom_policy_name="str", @@ -58,7 +58,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -66,12 +66,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_ddos_custom_policies_update_tags(self, resource_group): response = self.client.ddos_custom_policies.update_tags( resource_group_name=resource_group.name, ddos_custom_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations_async.py index 77f83c3f50a8..5993a847223b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_custom_policies_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_ddos_custom_policies_begin_delete(self, resource_group): response = await ( await self.client.ddos_custom_policies.begin_delete( resource_group_name=resource_group.name, ddos_custom_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_ddos_custom_policies_get(self, resource_group): response = await self.client.ddos_custom_policies.get( resource_group_name=resource_group.name, ddos_custom_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_ddos_custom_policies_begin_create_or_update(self, resource_group): response = await ( await self.client.ddos_custom_policies.begin_create_or_update( resource_group_name=resource_group.name, @@ -62,7 +62,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -71,12 +71,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_ddos_custom_policies_update_tags(self, resource_group): response = await self.client.ddos_custom_policies.update_tags( resource_group_name=resource_group.name, ddos_custom_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations.py index 1cfc394705da..4f387275e409 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_ddos_protection_plans_begin_delete(self, resource_group): response = self.client.ddos_protection_plans.begin_delete( resource_group_name=resource_group.name, ddos_protection_plan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_ddos_protection_plans_get(self, resource_group): response = self.client.ddos_protection_plans.get( resource_group_name=resource_group.name, ddos_protection_plan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_ddos_protection_plans_begin_create_or_update(self, resource_group): response = self.client.ddos_protection_plans.begin_create_or_update( resource_group_name=resource_group.name, ddos_protection_plan_name="str", @@ -60,7 +60,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetworks": [{"id": "str"}], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -68,12 +68,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_ddos_protection_plans_update_tags(self, resource_group): response = self.client.ddos_protection_plans.update_tags( resource_group_name=resource_group.name, ddos_protection_plan_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,9 +81,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_ddos_protection_plans_list(self, resource_group): response = self.client.ddos_protection_plans.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -91,10 +91,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_ddos_protection_plans_list_by_resource_group(self, resource_group): response = self.client.ddos_protection_plans.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations_async.py index d46ec0361b4f..d129e6f822a8 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ddos_protection_plans_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_ddos_protection_plans_begin_delete(self, resource_group): response = await ( await self.client.ddos_protection_plans.begin_delete( resource_group_name=resource_group.name, ddos_protection_plan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_ddos_protection_plans_get(self, resource_group): response = await self.client.ddos_protection_plans.get( resource_group_name=resource_group.name, ddos_protection_plan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_ddos_protection_plans_begin_create_or_update(self, resource_group): response = await ( await self.client.ddos_protection_plans.begin_create_or_update( resource_group_name=resource_group.name, @@ -64,7 +64,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetworks": [{"id": "str"}], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -73,12 +73,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_ddos_protection_plans_update_tags(self, resource_group): response = await self.client.ddos_protection_plans.update_tags( resource_group_name=resource_group.name, ddos_protection_plan_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -86,9 +86,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_ddos_protection_plans_list(self, resource_group): response = self.client.ddos_protection_plans.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -96,10 +96,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_ddos_protection_plans_list_by_resource_group(self, resource_group): response = self.client.ddos_protection_plans.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations.py index db562a272512..3ea55ea9e885 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_default_security_rules_list(self, resource_group): response = self.client.default_security_rules.list( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_default_security_rules_get(self, resource_group): response = self.client.default_security_rules.get( resource_group_name=resource_group.name, network_security_group_name="str", default_security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations_async.py index aacd4aff289a..e77e4a8be37c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_default_security_rules_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_default_security_rules_list(self, resource_group): response = self.client.default_security_rules.list( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_default_security_rules_get(self, resource_group): response = await self.client.default_security_rules.get( resource_group_name=resource_group.name, network_security_group_name="str", default_security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations.py index f83efd5bf1af..0000ea14c74e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_dscp_configuration_begin_create_or_update(self, resource_group): response = self.client.dscp_configuration.begin_create_or_update( resource_group_name=resource_group.name, dscp_configuration_name="str", @@ -29,6 +29,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -200,6 +201,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -638,6 +646,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1024,6 +1035,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1468,6 +1486,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2039,6 +2064,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2377,6 +2405,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2733,6 +2764,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3117,6 +3155,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3556,6 +3601,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4040,6 +4092,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4381,6 +4440,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4822,6 +4888,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5293,6 +5366,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5733,6 +5813,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6087,7 +6174,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -6095,11 +6182,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_dscp_configuration_begin_delete(self, resource_group): response = self.client.dscp_configuration.begin_delete( resource_group_name=resource_group.name, dscp_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -6107,11 +6194,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_dscp_configuration_get(self, resource_group): response = self.client.dscp_configuration.get( resource_group_name=resource_group.name, dscp_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -6119,10 +6206,10 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_dscp_configuration_list(self, resource_group): response = self.client.dscp_configuration.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -6130,9 +6217,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_dscp_configuration_list_all(self, resource_group): response = self.client.dscp_configuration.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations_async.py index cdeb998d4f12..53725ecbe5fa 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_dscp_configuration_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_dscp_configuration_begin_create_or_update(self, resource_group): response = await ( await self.client.dscp_configuration.begin_create_or_update( resource_group_name=resource_group.name, @@ -31,6 +31,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -206,6 +207,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -644,6 +652,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1030,6 +1045,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1477,6 +1499,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2052,6 +2081,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2390,6 +2426,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2746,6 +2785,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3133,6 +3179,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3574,6 +3627,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4058,6 +4118,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4399,6 +4466,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4843,6 +4917,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5314,6 +5395,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5757,6 +5845,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6111,7 +6206,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -6120,12 +6215,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_dscp_configuration_begin_delete(self, resource_group): response = await ( await self.client.dscp_configuration.begin_delete( resource_group_name=resource_group.name, dscp_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -6134,11 +6229,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_dscp_configuration_get(self, resource_group): response = await self.client.dscp_configuration.get( resource_group_name=resource_group.name, dscp_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -6146,10 +6241,10 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_dscp_configuration_list(self, resource_group): response = self.client.dscp_configuration.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -6157,9 +6252,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_dscp_configuration_list_all(self, resource_group): response = self.client.dscp_configuration.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations.py index 14b0e571408b..bee392b7c61f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_circuit_authorizations_begin_delete(self, resource_group): response = self.client.express_route_circuit_authorizations.begin_delete( resource_group_name=resource_group.name, circuit_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_circuit_authorizations_get(self, resource_group): response = self.client.express_route_circuit_authorizations.get( resource_group_name=resource_group.name, circuit_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_circuit_authorizations_begin_create_or_update(self, resource_group): response = self.client.express_route_circuit_authorizations.begin_create_or_update( resource_group_name=resource_group.name, circuit_name="str", @@ -61,7 +61,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_circuit_authorizations_list(self, resource_group): response = self.client.express_route_circuit_authorizations.list( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations_async.py index 0367e2673cdf..bd1c692ad645 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_authorizations_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_circuit_authorizations_begin_delete(self, resource_group): response = await ( await self.client.express_route_circuit_authorizations.begin_delete( resource_group_name=resource_group.name, circuit_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_circuit_authorizations_get(self, resource_group): response = await self.client.express_route_circuit_authorizations.get( resource_group_name=resource_group.name, circuit_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_circuit_authorizations_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_circuit_authorizations.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_circuit_authorizations_list(self, resource_group): response = self.client.express_route_circuit_authorizations.list( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations.py index 71f418d4623b..eee1f3931e45 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_circuit_connections_begin_delete(self, resource_group): response = self.client.express_route_circuit_connections.begin_delete( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -34,13 +34,13 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_circuit_connections_get(self, resource_group): response = self.client.express_route_circuit_connections.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -48,7 +48,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_circuit_connections_begin_create_or_update(self, resource_group): response = self.client.express_route_circuit_connections.begin_create_or_update( resource_group_name=resource_group.name, circuit_name="str", @@ -67,7 +67,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -75,12 +75,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_circuit_connections_list(self, resource_group): response = self.client.express_route_circuit_connections.list( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations_async.py index 0bc360bb94a7..bab2a581ea15 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_connections_operations_async.py @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_circuit_connections_begin_delete(self, resource_group): response = await ( await self.client.express_route_circuit_connections.begin_delete( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -37,13 +37,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_circuit_connections_get(self, resource_group): response = await self.client.express_route_circuit_connections.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_circuit_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_circuit_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -71,7 +71,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -80,12 +80,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_circuit_connections_list(self, resource_group): response = self.client.express_route_circuit_connections.list( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations.py index b454724f34cf..9db4ffa23f17 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_circuit_peerings_begin_delete(self, resource_group): response = self.client.express_route_circuit_peerings.begin_delete( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_circuit_peerings_get(self, resource_group): response = self.client.express_route_circuit_peerings.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_circuit_peerings_begin_create_or_update(self, resource_group): response = self.client.express_route_circuit_peerings.begin_create_or_update( resource_group_name=resource_group.name, circuit_name="str", @@ -125,7 +125,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "vlanId": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -133,11 +133,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_circuit_peerings_list(self, resource_group): response = self.client.express_route_circuit_peerings.list( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations_async.py index a66975d655c6..9823442880f2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuit_peerings_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_circuit_peerings_begin_delete(self, resource_group): response = await ( await self.client.express_route_circuit_peerings.begin_delete( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_circuit_peerings_get(self, resource_group): response = await self.client.express_route_circuit_peerings.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_circuit_peerings_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_circuit_peerings.begin_create_or_update( resource_group_name=resource_group.name, @@ -129,7 +129,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "vlanId": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -138,11 +138,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_circuit_peerings_list(self, resource_group): response = self.client.express_route_circuit_peerings.list( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations.py index fab0d7655983..1177a9259e63 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_circuits_begin_delete(self, resource_group): response = self.client.express_route_circuits.begin_delete( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_circuits_get(self, resource_group): response = self.client.express_route_circuits.get( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_circuits_begin_create_or_update(self, resource_group): response = self.client.express_route_circuits.begin_create_or_update( resource_group_name=resource_group.name, circuit_name="str", @@ -172,7 +172,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -180,12 +180,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_express_route_circuits_update_tags(self, resource_group): response = self.client.express_route_circuits.update_tags( resource_group_name=resource_group.name, circuit_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -193,13 +193,13 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_arp_table(self, resource_group): + def test_express_route_circuits_begin_list_arp_table(self, resource_group): response = self.client.express_route_circuits.begin_list_arp_table( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -207,13 +207,13 @@ def test_begin_list_arp_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_routes_table(self, resource_group): + def test_express_route_circuits_begin_list_routes_table(self, resource_group): response = self.client.express_route_circuits.begin_list_routes_table( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -221,13 +221,13 @@ def test_begin_list_routes_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_routes_table_summary(self, resource_group): + def test_express_route_circuits_begin_list_routes_table_summary(self, resource_group): response = self.client.express_route_circuits.begin_list_routes_table_summary( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -235,11 +235,11 @@ def test_begin_list_routes_table_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_stats(self, resource_group): + def test_express_route_circuits_get_stats(self, resource_group): response = self.client.express_route_circuits.get_stats( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -247,12 +247,12 @@ def test_get_stats(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_peering_stats(self, resource_group): + def test_express_route_circuits_get_peering_stats(self, resource_group): response = self.client.express_route_circuits.get_peering_stats( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -260,10 +260,10 @@ def test_get_peering_stats(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_circuits_list(self, resource_group): response = self.client.express_route_circuits.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -271,9 +271,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_express_route_circuits_list_all(self, resource_group): response = self.client.express_route_circuits.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations_async.py index b07afb22fa9c..4d0201f8710f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_circuits_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_circuits_begin_delete(self, resource_group): response = await ( await self.client.express_route_circuits.begin_delete( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_circuits_get(self, resource_group): response = await self.client.express_route_circuits.get( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_circuits_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_circuits.begin_create_or_update( resource_group_name=resource_group.name, @@ -176,7 +176,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -185,12 +185,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_express_route_circuits_update_tags(self, resource_group): response = await self.client.express_route_circuits.update_tags( resource_group_name=resource_group.name, circuit_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -198,14 +198,14 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_arp_table(self, resource_group): + async def test_express_route_circuits_begin_list_arp_table(self, resource_group): response = await ( await self.client.express_route_circuits.begin_list_arp_table( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -214,14 +214,14 @@ async def test_begin_list_arp_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_routes_table(self, resource_group): + async def test_express_route_circuits_begin_list_routes_table(self, resource_group): response = await ( await self.client.express_route_circuits.begin_list_routes_table( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -230,14 +230,14 @@ async def test_begin_list_routes_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_routes_table_summary(self, resource_group): + async def test_express_route_circuits_begin_list_routes_table_summary(self, resource_group): response = await ( await self.client.express_route_circuits.begin_list_routes_table_summary( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -246,11 +246,11 @@ async def test_begin_list_routes_table_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_stats(self, resource_group): + async def test_express_route_circuits_get_stats(self, resource_group): response = await self.client.express_route_circuits.get_stats( resource_group_name=resource_group.name, circuit_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -258,12 +258,12 @@ async def test_get_stats(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_peering_stats(self, resource_group): + async def test_express_route_circuits_get_peering_stats(self, resource_group): response = await self.client.express_route_circuits.get_peering_stats( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -271,10 +271,10 @@ async def test_get_peering_stats(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_circuits_list(self, resource_group): response = self.client.express_route_circuits.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -282,9 +282,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_express_route_circuits_list_all(self, resource_group): response = self.client.express_route_circuits.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations.py index 5926ca9903b3..ce6c7c1a0527 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_connections_begin_create_or_update(self, resource_group): response = self.client.express_route_connections.begin_create_or_update( resource_group_name=resource_group.name, express_route_gateway_name="str", @@ -47,7 +47,7 @@ def test_begin_create_or_update(self, resource_group): }, "routingWeight": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -55,12 +55,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_connections_get(self, resource_group): response = self.client.express_route_connections.get( resource_group_name=resource_group.name, express_route_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -68,12 +68,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_connections_begin_delete(self, resource_group): response = self.client.express_route_connections.begin_delete( resource_group_name=resource_group.name, express_route_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,11 +81,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_connections_list(self, resource_group): response = self.client.express_route_connections.list( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations_async.py index 70c7b0932ddf..cf39fd478dc6 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -52,7 +52,7 @@ async def test_begin_create_or_update(self, resource_group): }, "routingWeight": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -61,12 +61,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_connections_get(self, resource_group): response = await self.client.express_route_connections.get( resource_group_name=resource_group.name, express_route_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -74,13 +74,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_connections_begin_delete(self, resource_group): response = await ( await self.client.express_route_connections.begin_delete( resource_group_name=resource_group.name, express_route_gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -89,11 +89,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_connections_list(self, resource_group): response = await self.client.express_route_connections.list( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations.py index 956a485cdf27..0d956529ac8e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_cross_connection_peerings_list(self, resource_group): response = self.client.express_route_cross_connection_peerings.list( resource_group_name=resource_group.name, cross_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_cross_connection_peerings_begin_delete(self, resource_group): response = self.client.express_route_cross_connection_peerings.begin_delete( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -45,12 +45,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_cross_connection_peerings_get(self, resource_group): response = self.client.express_route_cross_connection_peerings.get( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_cross_connection_peerings_begin_create_or_update(self, resource_group): response = self.client.express_route_cross_connection_peerings.begin_create_or_update( resource_group_name=resource_group.name, cross_connection_name="str", @@ -103,7 +103,7 @@ def test_begin_create_or_update(self, resource_group): "state": "str", "vlanId": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations_async.py index 067b96cff977..0f5f7158aabd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connection_peerings_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_cross_connection_peerings_list(self, resource_group): response = self.client.express_route_cross_connection_peerings.list( resource_group_name=resource_group.name, cross_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_cross_connection_peerings_begin_delete(self, resource_group): response = await ( await self.client.express_route_cross_connection_peerings.begin_delete( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -48,12 +48,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_cross_connection_peerings_get(self, resource_group): response = await self.client.express_route_cross_connection_peerings.get( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -61,7 +61,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_cross_connection_peerings_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_cross_connection_peerings.begin_create_or_update( resource_group_name=resource_group.name, @@ -107,7 +107,7 @@ async def test_begin_create_or_update(self, resource_group): "state": "str", "vlanId": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations.py index 700d51c9ddae..82c7504bc990 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_cross_connections_list(self, resource_group): response = self.client.express_route_cross_connections.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -30,10 +30,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_express_route_cross_connections_list_by_resource_group(self, resource_group): response = self.client.express_route_cross_connections.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,11 +41,11 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_cross_connections_get(self, resource_group): response = self.client.express_route_cross_connections.get( resource_group_name=resource_group.name, cross_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_cross_connections_begin_create_or_update(self, resource_group): response = self.client.express_route_cross_connections.begin_create_or_update( resource_group_name=resource_group.name, cross_connection_name="str", @@ -116,7 +116,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -124,12 +124,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_express_route_cross_connections_update_tags(self, resource_group): response = self.client.express_route_cross_connections.update_tags( resource_group_name=resource_group.name, cross_connection_name="str", cross_connection_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -137,13 +137,13 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_arp_table(self, resource_group): + def test_express_route_cross_connections_begin_list_arp_table(self, resource_group): response = self.client.express_route_cross_connections.begin_list_arp_table( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -151,13 +151,13 @@ def test_begin_list_arp_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_routes_table_summary(self, resource_group): + def test_express_route_cross_connections_begin_list_routes_table_summary(self, resource_group): response = self.client.express_route_cross_connections.begin_list_routes_table_summary( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -165,13 +165,13 @@ def test_begin_list_routes_table_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_routes_table(self, resource_group): + def test_express_route_cross_connections_begin_list_routes_table(self, resource_group): response = self.client.express_route_cross_connections.begin_list_routes_table( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations_async.py index d0ff5d7041e4..157647fb4d0b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_cross_connections_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_cross_connections_list(self, resource_group): response = self.client.express_route_cross_connections.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -31,10 +31,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_express_route_cross_connections_list_by_resource_group(self, resource_group): response = self.client.express_route_cross_connections.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,11 +42,11 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_cross_connections_get(self, resource_group): response = await self.client.express_route_cross_connections.get( resource_group_name=resource_group.name, cross_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_cross_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_cross_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -118,7 +118,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -127,12 +127,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_express_route_cross_connections_update_tags(self, resource_group): response = await self.client.express_route_cross_connections.update_tags( resource_group_name=resource_group.name, cross_connection_name="str", cross_connection_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -140,14 +140,14 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_arp_table(self, resource_group): + async def test_express_route_cross_connections_begin_list_arp_table(self, resource_group): response = await ( await self.client.express_route_cross_connections.begin_list_arp_table( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -156,14 +156,14 @@ async def test_begin_list_arp_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_routes_table_summary(self, resource_group): + async def test_express_route_cross_connections_begin_list_routes_table_summary(self, resource_group): response = await ( await self.client.express_route_cross_connections.begin_list_routes_table_summary( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -172,14 +172,14 @@ async def test_begin_list_routes_table_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_routes_table(self, resource_group): + async def test_express_route_cross_connections_begin_list_routes_table(self, resource_group): response = await ( await self.client.express_route_cross_connections.begin_list_routes_table( resource_group_name=resource_group.name, cross_connection_name="str", peering_name="str", device_path="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations.py index 75a6df99477a..27686c65f523 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_express_route_gateways_list_by_subscription(self, resource_group): response = self.client.express_route_gateways.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -30,10 +30,10 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_express_route_gateways_list_by_resource_group(self, resource_group): response = self.client.express_route_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_gateways_begin_create_or_update(self, resource_group): response = self.client.express_route_gateways.begin_create_or_update( resource_group_name=resource_group.name, express_route_gateway_name="str", @@ -86,7 +86,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -94,12 +94,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_express_route_gateways_begin_update_tags(self, resource_group): response = self.client.express_route_gateways.begin_update_tags( resource_group_name=resource_group.name, express_route_gateway_name="str", express_route_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -107,11 +107,11 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_gateways_get(self, resource_group): response = self.client.express_route_gateways.get( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -119,11 +119,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_gateways_begin_delete(self, resource_group): response = self.client.express_route_gateways.begin_delete( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations_async.py index 5098514f9300..6a37f0193d24 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_gateways_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_express_route_gateways_list_by_subscription(self, resource_group): response = await self.client.express_route_gateways.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -31,10 +31,10 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_express_route_gateways_list_by_resource_group(self, resource_group): response = await self.client.express_route_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -88,7 +88,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -97,13 +97,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_express_route_gateways_begin_update_tags(self, resource_group): response = await ( await self.client.express_route_gateways.begin_update_tags( resource_group_name=resource_group.name, express_route_gateway_name="str", express_route_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -112,11 +112,11 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_gateways_get(self, resource_group): response = await self.client.express_route_gateways.get( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -124,12 +124,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_gateways_begin_delete(self, resource_group): response = await ( await self.client.express_route_gateways.begin_delete( resource_group_name=resource_group.name, express_route_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations.py index ee71638e153c..64684aa54cf9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_links_get(self, resource_group): response = self.client.express_route_links.get( resource_group_name=resource_group.name, express_route_port_name="str", link_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,11 +33,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_links_list(self, resource_group): response = self.client.express_route_links.list( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations_async.py index 947f902290e1..5e6c1c21993f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_links_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_links_get(self, resource_group): response = await self.client.express_route_links.get( resource_group_name=resource_group.name, express_route_port_name="str", link_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,11 +34,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_links_list(self, resource_group): response = self.client.express_route_links.list( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations.py index 762dba785b51..4d421fb07f48 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_port_authorizations_begin_delete(self, resource_group): response = self.client.express_route_port_authorizations.begin_delete( resource_group_name=resource_group.name, express_route_port_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_port_authorizations_get(self, resource_group): response = self.client.express_route_port_authorizations.get( resource_group_name=resource_group.name, express_route_port_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_port_authorizations_begin_create_or_update(self, resource_group): response = self.client.express_route_port_authorizations.begin_create_or_update( resource_group_name=resource_group.name, express_route_port_name="str", @@ -61,7 +61,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_port_authorizations_list(self, resource_group): response = self.client.express_route_port_authorizations.list( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations_async.py index 4cf8bcf604c5..06b791821cb9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_port_authorizations_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_port_authorizations_begin_delete(self, resource_group): response = await ( await self.client.express_route_port_authorizations.begin_delete( resource_group_name=resource_group.name, express_route_port_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_port_authorizations_get(self, resource_group): response = await self.client.express_route_port_authorizations.get( resource_group_name=resource_group.name, express_route_port_name="str", authorization_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_port_authorizations_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_port_authorizations.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_port_authorizations_list(self, resource_group): response = self.client.express_route_port_authorizations.list( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations.py index 397c83aa02ab..c33a76a5184f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_ports_locations_list(self, resource_group): response = self.client.express_route_ports_locations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -30,10 +30,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_ports_locations_get(self, resource_group): response = self.client.express_route_ports_locations.get( location_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations_async.py index bb86cdc86433..c22e325715e1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_locations_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_ports_locations_list(self, resource_group): response = self.client.express_route_ports_locations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -31,10 +31,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_ports_locations_get(self, resource_group): response = await self.client.express_route_ports_locations.get( location_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations.py index 779e1d450cfd..0b87ea39c9d3 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_express_route_ports_begin_delete(self, resource_group): response = self.client.express_route_ports.begin_delete( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_express_route_ports_get(self, resource_group): response = self.client.express_route_ports.get( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_express_route_ports_begin_create_or_update(self, resource_group): response = self.client.express_route_ports.begin_create_or_update( resource_group_name=resource_group.name, express_route_port_name="str", @@ -94,7 +94,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -102,12 +102,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_express_route_ports_update_tags(self, resource_group): response = self.client.express_route_ports.update_tags( resource_group_name=resource_group.name, express_route_port_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -115,10 +115,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_express_route_ports_list_by_resource_group(self, resource_group): response = self.client.express_route_ports.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -126,9 +126,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_ports_list(self, resource_group): response = self.client.express_route_ports.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -136,12 +136,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_generate_loa(self, resource_group): + def test_express_route_ports_generate_loa(self, resource_group): response = self.client.express_route_ports.generate_loa( resource_group_name=resource_group.name, express_route_port_name="str", request={"customerName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations_async.py index 8f5d96c5930c..359cb1d93c54 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_ports_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_express_route_ports_begin_delete(self, resource_group): response = await ( await self.client.express_route_ports.begin_delete( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_express_route_ports_get(self, resource_group): response = await self.client.express_route_ports.get( resource_group_name=resource_group.name, express_route_port_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_express_route_ports_begin_create_or_update(self, resource_group): response = await ( await self.client.express_route_ports.begin_create_or_update( resource_group_name=resource_group.name, @@ -98,7 +98,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -107,12 +107,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_express_route_ports_update_tags(self, resource_group): response = await self.client.express_route_ports.update_tags( resource_group_name=resource_group.name, express_route_port_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -120,10 +120,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_express_route_ports_list_by_resource_group(self, resource_group): response = self.client.express_route_ports.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -131,9 +131,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_ports_list(self, resource_group): response = self.client.express_route_ports.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -141,12 +141,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_generate_loa(self, resource_group): + async def test_express_route_ports_generate_loa(self, resource_group): response = await self.client.express_route_ports.generate_loa( resource_group_name=resource_group.name, express_route_port_name="str", request={"customerName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations.py index 9a79236dc790..bee78f5f99a2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_provider_ports_location_list(self, resource_group): response = self.client.express_route_provider_ports_location.list( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations_async.py index fdbe192a62af..81d2c4bbcf71 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_provider_ports_location_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_provider_ports_location_list(self, resource_group): response = await self.client.express_route_provider_ports_location.list( - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations.py index 07ec0c1b8656..272d85882d5b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_express_route_service_providers_list(self, resource_group): response = self.client.express_route_service_providers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations_async.py index 980f114cf8a3..3da2603a93df 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_express_route_service_providers_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_express_route_service_providers_list(self, resource_group): response = self.client.express_route_service_providers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations.py index 755e2674dc47..488ed2814291 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_firewall_policies_begin_delete(self, resource_group): response = self.client.firewall_policies.begin_delete( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_firewall_policies_get(self, resource_group): response = self.client.firewall_policies.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_firewall_policies_begin_create_or_update(self, resource_group): response = self.client.firewall_policies.begin_create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -111,7 +111,7 @@ def test_begin_create_or_update(self, resource_group): "transportSecurity": {"certificateAuthority": {"keyVaultSecretId": "str", "name": "str"}}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,12 +119,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_firewall_policies_update_tags(self, resource_group): response = self.client.firewall_policies.update_tags( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -132,10 +132,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_firewall_policies_list(self, resource_group): response = self.client.firewall_policies.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -143,9 +143,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_firewall_policies_list_all(self, resource_group): response = self.client.firewall_policies.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations_async.py index 0ef2ebfce8c3..21b51e862acd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policies_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_firewall_policies_begin_delete(self, resource_group): response = await ( await self.client.firewall_policies.begin_delete( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_firewall_policies_get(self, resource_group): response = await self.client.firewall_policies.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_firewall_policies_begin_create_or_update(self, resource_group): response = await ( await self.client.firewall_policies.begin_create_or_update( resource_group_name=resource_group.name, @@ -115,7 +115,7 @@ async def test_begin_create_or_update(self, resource_group): "transportSecurity": {"certificateAuthority": {"keyVaultSecretId": "str", "name": "str"}}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -124,12 +124,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_firewall_policies_update_tags(self, resource_group): response = await self.client.firewall_policies.update_tags( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -137,10 +137,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_firewall_policies_list(self, resource_group): response = self.client.firewall_policies.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -148,9 +148,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_firewall_policies_list_all(self, resource_group): response = self.client.firewall_policies.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations.py index b743bf41a954..4678bee5f64c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_deploy(self, resource_group): + def test_firewall_policy_deployments_begin_deploy(self, resource_group): response = self.client.firewall_policy_deployments.begin_deploy( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations_async.py index 1a9b048ec928..6f56327baf1a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_deployments_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_deploy(self, resource_group): + async def test_firewall_policy_deployments_begin_deploy(self, resource_group): response = await ( await self.client.firewall_policy_deployments.begin_deploy( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations.py index f0045f0c7f17..da0d17952d5d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_firewall_policy_drafts_create_or_update(self, resource_group): response = self.client.firewall_policy_drafts.create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -73,7 +73,7 @@ def test_create_or_update(self, resource_group): "threatIntelWhitelist": {"fqdns": ["str"], "ipAddresses": ["str"]}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,11 +81,11 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_firewall_policy_drafts_delete(self, resource_group): response = self.client.firewall_policy_drafts.delete( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -93,11 +93,11 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_firewall_policy_drafts_get(self, resource_group): response = self.client.firewall_policy_drafts.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations_async.py index bdeeebd1e658..5b087cfb4878 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_drafts_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_firewall_policy_drafts_create_or_update(self, resource_group): response = await self.client.firewall_policy_drafts.create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -74,7 +74,7 @@ async def test_create_or_update(self, resource_group): "threatIntelWhitelist": {"fqdns": ["str"], "ipAddresses": ["str"]}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -82,11 +82,11 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_firewall_policy_drafts_delete(self, resource_group): response = await self.client.firewall_policy_drafts.delete( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -94,11 +94,11 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_firewall_policy_drafts_get(self, resource_group): response = await self.client.firewall_policy_drafts.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations.py index dc5d7297896a..f8434e7508c4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_firewall_policy_idps_signatures_filter_values_list(self, resource_group): response = self.client.firewall_policy_idps_signatures_filter_values.list( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"filterName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations_async.py index eaebf690a11f..7738501d2338 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_filter_values_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_firewall_policy_idps_signatures_filter_values_list(self, resource_group): response = await self.client.firewall_policy_idps_signatures_filter_values.list( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"filterName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations.py index 6e36abd770d9..a2ee379a0f0a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_firewall_policy_idps_signatures_list(self, resource_group): response = self.client.firewall_policy_idps_signatures.list( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -31,7 +31,7 @@ def test_list(self, resource_group): "search": "str", "skip": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations_async.py index 02c94ffbc79b..82ecf08eb2ab 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_firewall_policy_idps_signatures_list(self, resource_group): response = await self.client.firewall_policy_idps_signatures.list( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -32,7 +32,7 @@ async def test_list(self, resource_group): "search": "str", "skip": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations.py index ad506e6c1b78..f2b20afca782 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_patch(self, resource_group): + def test_firewall_policy_idps_signatures_overrides_patch(self, resource_group): response = self.client.firewall_policy_idps_signatures_overrides.patch( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"id": "str", "name": "str", "properties": {"signatures": {"str": "str"}}, "type": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_patch(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_put(self, resource_group): + def test_firewall_policy_idps_signatures_overrides_put(self, resource_group): response = self.client.firewall_policy_idps_signatures_overrides.put( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"id": "str", "name": "str", "properties": {"signatures": {"str": "str"}}, "type": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,11 +46,11 @@ def test_put(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_firewall_policy_idps_signatures_overrides_get(self, resource_group): response = self.client.firewall_policy_idps_signatures_overrides.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -58,11 +58,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_firewall_policy_idps_signatures_overrides_list(self, resource_group): response = self.client.firewall_policy_idps_signatures_overrides.list( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations_async.py index 5f00442dedd0..eb4b53f84021 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_idps_signatures_overrides_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_patch(self, resource_group): + async def test_firewall_policy_idps_signatures_overrides_patch(self, resource_group): response = await self.client.firewall_policy_idps_signatures_overrides.patch( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"id": "str", "name": "str", "properties": {"signatures": {"str": "str"}}, "type": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,12 +34,12 @@ async def test_patch(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_put(self, resource_group): + async def test_firewall_policy_idps_signatures_overrides_put(self, resource_group): response = await self.client.firewall_policy_idps_signatures_overrides.put( resource_group_name=resource_group.name, firewall_policy_name="str", parameters={"id": "str", "name": "str", "properties": {"signatures": {"str": "str"}}, "type": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,11 +47,11 @@ async def test_put(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_firewall_policy_idps_signatures_overrides_get(self, resource_group): response = await self.client.firewall_policy_idps_signatures_overrides.get( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -59,11 +59,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_firewall_policy_idps_signatures_overrides_list(self, resource_group): response = await self.client.firewall_policy_idps_signatures_overrides.list( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations.py index 3a7b86cc7457..faee0b0798ed 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_firewall_policy_rule_collection_group_drafts_delete(self, resource_group): response = self.client.firewall_policy_rule_collection_group_drafts.delete( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_firewall_policy_rule_collection_group_drafts_create_or_update(self, resource_group): response = self.client.firewall_policy_rule_collection_group_drafts.create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -46,7 +46,7 @@ def test_create_or_update(self, resource_group): "size": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -54,12 +54,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_firewall_policy_rule_collection_group_drafts_get(self, resource_group): response = self.client.firewall_policy_rule_collection_group_drafts.get( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations_async.py index 90f3816907fe..d1c4436bcdb4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_group_drafts_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_firewall_policy_rule_collection_group_drafts_delete(self, resource_group): response = await self.client.firewall_policy_rule_collection_group_drafts.delete( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_firewall_policy_rule_collection_group_drafts_create_or_update(self, resource_group): response = await self.client.firewall_policy_rule_collection_group_drafts.create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -47,7 +47,7 @@ async def test_create_or_update(self, resource_group): "size": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -55,12 +55,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_firewall_policy_rule_collection_group_drafts_get(self, resource_group): response = await self.client.firewall_policy_rule_collection_group_drafts.get( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations.py index 67478735c7f1..30cd047ab4dd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_firewall_policy_rule_collection_groups_begin_delete(self, resource_group): response = self.client.firewall_policy_rule_collection_groups.begin_delete( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_firewall_policy_rule_collection_groups_get(self, resource_group): response = self.client.firewall_policy_rule_collection_groups.get( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_firewall_policy_rule_collection_groups_begin_create_or_update(self, resource_group): response = self.client.firewall_policy_rule_collection_groups.begin_create_or_update( resource_group_name=resource_group.name, firewall_policy_name="str", @@ -61,7 +61,7 @@ def test_begin_create_or_update(self, resource_group): "size": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_firewall_policy_rule_collection_groups_list(self, resource_group): response = self.client.firewall_policy_rule_collection_groups.list( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations_async.py index 9704a1ad529a..33ed2656945c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_firewall_policy_rule_collection_groups_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_firewall_policy_rule_collection_groups_begin_delete(self, resource_group): response = await ( await self.client.firewall_policy_rule_collection_groups.begin_delete( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_firewall_policy_rule_collection_groups_get(self, resource_group): response = await self.client.firewall_policy_rule_collection_groups.get( resource_group_name=resource_group.name, firewall_policy_name="str", rule_collection_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_firewall_policy_rule_collection_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.firewall_policy_rule_collection_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): "size": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_firewall_policy_rule_collection_groups_list(self, resource_group): response = self.client.firewall_policy_rule_collection_groups.list( resource_group_name=resource_group.name, firewall_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations.py index 3d248e49ae08..8b6d788e35b0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_flow_logs_begin_create_or_update(self, resource_group): response = self.client.flow_logs.begin_create_or_update( resource_group_name=resource_group.name, network_watcher_name="str", @@ -56,7 +56,7 @@ def test_begin_create_or_update(self, resource_group): "targetResourceId": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -64,13 +64,13 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_flow_logs_update_tags(self, resource_group): response = self.client.flow_logs.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -78,12 +78,12 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_flow_logs_get(self, resource_group): response = self.client.flow_logs.get( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -91,12 +91,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_flow_logs_begin_delete(self, resource_group): response = self.client.flow_logs.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,11 +104,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_flow_logs_list(self, resource_group): response = self.client.flow_logs.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations_async.py index 2f30c77981e0..4b37b6c3fb4f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_flow_logs_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_flow_logs_begin_create_or_update(self, resource_group): response = await ( await self.client.flow_logs.begin_create_or_update( resource_group_name=resource_group.name, @@ -58,7 +58,7 @@ async def test_begin_create_or_update(self, resource_group): "targetResourceId": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -67,13 +67,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_flow_logs_update_tags(self, resource_group): response = await self.client.flow_logs.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,12 +81,12 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_flow_logs_get(self, resource_group): response = await self.client.flow_logs.get( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -94,13 +94,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_flow_logs_begin_delete(self, resource_group): response = await ( await self.client.flow_logs.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", flow_log_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -109,11 +109,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_flow_logs_list(self, resource_group): response = self.client.flow_logs.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations.py index bb4200bb7d6b..126bd0c5db6f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_hub_route_tables_begin_create_or_update(self, resource_group): response = self.client.hub_route_tables.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -44,7 +44,7 @@ def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -52,12 +52,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_hub_route_tables_get(self, resource_group): response = self.client.hub_route_tables.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -65,12 +65,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_hub_route_tables_begin_delete(self, resource_group): response = self.client.hub_route_tables.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -78,11 +78,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_hub_route_tables_list(self, resource_group): response = self.client.hub_route_tables.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations_async.py index e7ea0979ba7d..6b81a8ab55b3 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_route_tables_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_hub_route_tables_begin_create_or_update(self, resource_group): response = await ( await self.client.hub_route_tables.begin_create_or_update( resource_group_name=resource_group.name, @@ -46,7 +46,7 @@ async def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -55,12 +55,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_hub_route_tables_get(self, resource_group): response = await self.client.hub_route_tables.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -68,13 +68,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_hub_route_tables_begin_delete(self, resource_group): response = await ( await self.client.hub_route_tables.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -83,11 +83,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_hub_route_tables_list(self, resource_group): response = self.client.hub_route_tables.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations.py index 224e36de26db..94f9c0ef275a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_hub_virtual_network_connections_begin_create_or_update(self, resource_group): response = self.client.hub_virtual_network_connections.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -46,7 +46,7 @@ def test_begin_create_or_update(self, resource_group): }, }, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -54,12 +54,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_hub_virtual_network_connections_begin_delete(self, resource_group): response = self.client.hub_virtual_network_connections.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -67,12 +67,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_hub_virtual_network_connections_get(self, resource_group): response = self.client.hub_virtual_network_connections.get( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -80,11 +80,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_hub_virtual_network_connections_list(self, resource_group): response = self.client.hub_virtual_network_connections.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations_async.py index 000a5296bbdc..c244a22d0e10 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_hub_virtual_network_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_hub_virtual_network_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.hub_virtual_network_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -51,7 +51,7 @@ async def test_begin_create_or_update(self, resource_group): }, }, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -60,13 +60,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_hub_virtual_network_connections_begin_delete(self, resource_group): response = await ( await self.client.hub_virtual_network_connections.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -75,12 +75,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_hub_virtual_network_connections_get(self, resource_group): response = await self.client.hub_virtual_network_connections.get( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -88,11 +88,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_hub_virtual_network_connections_list(self, resource_group): response = self.client.hub_virtual_network_connections.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations.py index da64244291e3..98f107e23c37 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_inbound_nat_rules_list(self, resource_group): response = self.client.inbound_nat_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_inbound_nat_rules_begin_delete(self, resource_group): response = self.client.inbound_nat_rules.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", inbound_nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -45,12 +45,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_inbound_nat_rules_get(self, resource_group): response = self.client.inbound_nat_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", inbound_nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_inbound_nat_rules_begin_create_or_update(self, resource_group): response = self.client.inbound_nat_rules.begin_create_or_update( resource_group_name=resource_group.name, load_balancer_name="str", @@ -199,6 +199,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -292,6 +295,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -680,6 +684,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1205,6 +1210,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1296,6 +1304,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1798,6 +1807,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2387,6 +2397,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2480,6 +2497,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2822,6 +2840,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3306,6 +3325,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3399,6 +3421,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3736,6 +3759,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4122,7 +4146,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations_async.py index 7f58a34b98bc..6c136ce6cb52 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_nat_rules_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_inbound_nat_rules_list(self, resource_group): response = self.client.inbound_nat_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_inbound_nat_rules_begin_delete(self, resource_group): response = await ( await self.client.inbound_nat_rules.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", inbound_nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -48,12 +48,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_inbound_nat_rules_get(self, resource_group): response = await self.client.inbound_nat_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", inbound_nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -61,7 +61,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_inbound_nat_rules_begin_create_or_update(self, resource_group): response = await ( await self.client.inbound_nat_rules.begin_create_or_update( resource_group_name=resource_group.name, @@ -203,6 +203,9 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -296,6 +299,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -684,6 +688,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1209,6 +1214,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1302,6 +1310,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1804,6 +1813,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2393,6 +2403,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2486,6 +2503,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2828,6 +2846,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3312,6 +3331,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3405,6 +3431,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3742,6 +3769,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4131,7 +4159,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations.py index 77cc861e4fa1..992626de1d57 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_inbound_security_rule_begin_create_or_update(self, resource_group): response = self.client.inbound_security_rule.begin_create_or_update( resource_group_name=resource_group.name, network_virtual_appliance_name="str", @@ -43,7 +43,7 @@ def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -51,12 +51,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_inbound_security_rule_get(self, resource_group): response = self.client.inbound_security_rule.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations_async.py index ff297adecb32..67a80a5cdcc9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_inbound_security_rule_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_inbound_security_rule_begin_create_or_update(self, resource_group): response = await ( await self.client.inbound_security_rule.begin_create_or_update( resource_group_name=resource_group.name, @@ -45,7 +45,7 @@ async def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -54,12 +54,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_inbound_security_rule_get(self, resource_group): response = await self.client.inbound_security_rule.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations.py index 51a18e0a1745..eb2f8a8155b0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_ip_allocations_begin_delete(self, resource_group): response = self.client.ip_allocations.begin_delete( resource_group_name=resource_group.name, ip_allocation_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_ip_allocations_get(self, resource_group): response = self.client.ip_allocations.get( resource_group_name=resource_group.name, ip_allocation_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_ip_allocations_begin_create_or_update(self, resource_group): response = self.client.ip_allocations.begin_create_or_update( resource_group_name=resource_group.name, ip_allocation_name="str", @@ -63,7 +63,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -71,12 +71,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_ip_allocations_update_tags(self, resource_group): response = self.client.ip_allocations.update_tags( resource_group_name=resource_group.name, ip_allocation_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -84,9 +84,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_ip_allocations_list(self, resource_group): response = self.client.ip_allocations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -94,10 +94,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_ip_allocations_list_by_resource_group(self, resource_group): response = self.client.ip_allocations.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations_async.py index 9c866896331f..79078da63d66 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_allocations_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_ip_allocations_begin_delete(self, resource_group): response = await ( await self.client.ip_allocations.begin_delete( resource_group_name=resource_group.name, ip_allocation_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_ip_allocations_get(self, resource_group): response = await self.client.ip_allocations.get( resource_group_name=resource_group.name, ip_allocation_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_ip_allocations_begin_create_or_update(self, resource_group): response = await ( await self.client.ip_allocations.begin_create_or_update( resource_group_name=resource_group.name, @@ -67,7 +67,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -76,12 +76,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_ip_allocations_update_tags(self, resource_group): response = await self.client.ip_allocations.update_tags( resource_group_name=resource_group.name, ip_allocation_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -89,9 +89,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_ip_allocations_list(self, resource_group): response = self.client.ip_allocations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -99,10 +99,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_ip_allocations_list_by_resource_group(self, resource_group): response = self.client.ip_allocations.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations.py index 4f46b450ce93..4296d44650aa 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_ip_groups_get(self, resource_group): response = self.client.ip_groups.get( resource_group_name=resource_group.name, ip_groups_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_ip_groups_begin_create_or_update(self, resource_group): response = self.client.ip_groups.begin_create_or_update( resource_group_name=resource_group.name, ip_groups_name="str", @@ -48,7 +48,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -56,12 +56,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_groups(self, resource_group): + def test_ip_groups_update_groups(self, resource_group): response = self.client.ip_groups.update_groups( resource_group_name=resource_group.name, ip_groups_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_update_groups(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_ip_groups_begin_delete(self, resource_group): response = self.client.ip_groups.begin_delete( resource_group_name=resource_group.name, ip_groups_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,10 +81,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_ip_groups_list_by_resource_group(self, resource_group): response = self.client.ip_groups.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -92,9 +92,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_ip_groups_list(self, resource_group): response = self.client.ip_groups.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations_async.py index 68cdb94fda27..349e82b3e91a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ip_groups_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_ip_groups_get(self, resource_group): response = await self.client.ip_groups.get( resource_group_name=resource_group.name, ip_groups_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_ip_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.ip_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -50,7 +50,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -59,12 +59,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_groups(self, resource_group): + async def test_ip_groups_update_groups(self, resource_group): response = await self.client.ip_groups.update_groups( resource_group_name=resource_group.name, ip_groups_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -72,12 +72,12 @@ async def test_update_groups(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_ip_groups_begin_delete(self, resource_group): response = await ( await self.client.ip_groups.begin_delete( resource_group_name=resource_group.name, ip_groups_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -86,10 +86,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_ip_groups_list_by_resource_group(self, resource_group): response = self.client.ip_groups.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -97,9 +97,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_ip_groups_list(self, resource_group): response = self.client.ip_groups.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations.py new file mode 100644 index 000000000000..761493e07b8d --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations.py @@ -0,0 +1,132 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementIpamPoolsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_list(self, resource_group): + response = self.client.ipam_pools.list( + resource_group_name=resource_group.name, + network_manager_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_begin_create(self, resource_group): + response = self.client.ipam_pools.begin_create( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + body={ + "location": "str", + "properties": { + "addressPrefixes": ["str"], + "description": "str", + "displayName": "str", + "ipAddressType": ["str"], + "parentPoolName": "str", + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_update(self, resource_group): + response = self.client.ipam_pools.update( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_get(self, resource_group): + response = self.client.ipam_pools.get( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_begin_delete(self, resource_group): + response = self.client.ipam_pools.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_get_pool_usage(self, resource_group): + response = self.client.ipam_pools.get_pool_usage( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ipam_pools_list_associated_resources(self, resource_group): + response = self.client.ipam_pools.list_associated_resources( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations_async.py new file mode 100644 index 000000000000..1a08a5c06743 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_ipam_pools_operations_async.py @@ -0,0 +1,137 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementIpamPoolsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_list(self, resource_group): + response = self.client.ipam_pools.list( + resource_group_name=resource_group.name, + network_manager_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_begin_create(self, resource_group): + response = await ( + await self.client.ipam_pools.begin_create( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + body={ + "location": "str", + "properties": { + "addressPrefixes": ["str"], + "description": "str", + "displayName": "str", + "ipAddressType": ["str"], + "parentPoolName": "str", + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_update(self, resource_group): + response = await self.client.ipam_pools.update( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_get(self, resource_group): + response = await self.client.ipam_pools.get( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_begin_delete(self, resource_group): + response = await ( + await self.client.ipam_pools.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_get_pool_usage(self, resource_group): + response = await self.client.ipam_pools.get_pool_usage( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ipam_pools_list_associated_resources(self, resource_group): + response = self.client.ipam_pools.list_associated_resources( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations.py index 77f9e0bc092f..4de4f2bef451 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_backend_address_pools_list(self, resource_group): response = self.client.load_balancer_backend_address_pools.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancer_backend_address_pools_get(self, resource_group): response = self.client.load_balancer_backend_address_pools.get( resource_group_name=resource_group.name, load_balancer_name="str", backend_address_pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_load_balancer_backend_address_pools_begin_create_or_update(self, resource_group): response = self.client.load_balancer_backend_address_pools.begin_create_or_update( resource_group_name=resource_group.name, load_balancer_name="str", @@ -173,6 +173,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -266,6 +269,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -654,6 +658,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1179,6 +1184,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1272,6 +1280,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1774,6 +1783,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2363,6 +2373,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2456,6 +2473,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2798,6 +2816,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3282,6 +3301,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3375,6 +3401,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3712,6 +3739,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4116,7 +4144,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -4124,12 +4152,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_load_balancer_backend_address_pools_begin_delete(self, resource_group): response = self.client.load_balancer_backend_address_pools.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", backend_address_pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations_async.py index 8649b74525da..da21b9a1b671 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_backend_address_pools_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_backend_address_pools_list(self, resource_group): response = self.client.load_balancer_backend_address_pools.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancer_backend_address_pools_get(self, resource_group): response = await self.client.load_balancer_backend_address_pools.get( resource_group_name=resource_group.name, load_balancer_name="str", backend_address_pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_load_balancer_backend_address_pools_begin_create_or_update(self, resource_group): response = await ( await self.client.load_balancer_backend_address_pools.begin_create_or_update( resource_group_name=resource_group.name, @@ -175,6 +175,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -268,6 +275,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -656,6 +664,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1187,6 +1196,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1280,6 +1292,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1784,6 +1797,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2376,6 +2390,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2469,6 +2490,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2816,6 +2838,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3303,6 +3326,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3396,6 +3426,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3738,6 +3769,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4145,7 +4177,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "virtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -4154,13 +4186,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_load_balancer_backend_address_pools_begin_delete(self, resource_group): response = await ( await self.client.load_balancer_backend_address_pools.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", backend_address_pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations.py index ab8d9c8e651c..fb675d3a4c81 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_frontend_ip_configurations_list(self, resource_group): response = self.client.load_balancer_frontend_ip_configurations.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancer_frontend_ip_configurations_get(self, resource_group): response = self.client.load_balancer_frontend_ip_configurations.get( resource_group_name=resource_group.name, load_balancer_name="str", frontend_ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations_async.py index 0089aad918f2..0a91659ba833 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_frontend_ip_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_frontend_ip_configurations_list(self, resource_group): response = self.client.load_balancer_frontend_ip_configurations.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancer_frontend_ip_configurations_get(self, resource_group): response = await self.client.load_balancer_frontend_ip_configurations.get( resource_group_name=resource_group.name, load_balancer_name="str", frontend_ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations.py index 2a9b564b2db5..527ecd992e71 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_load_balancing_rules_list(self, resource_group): response = self.client.load_balancer_load_balancing_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,13 +32,26 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancer_load_balancing_rules_get(self, resource_group): response = self.client.load_balancer_load_balancing_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", load_balancing_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_load_balancer_load_balancing_rules_begin_health(self, resource_group): + response = self.client.load_balancer_load_balancing_rules.begin_health( + group_name="str", + load_balancer_name="str", + load_balancing_rule_name="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations_async.py index a1c20a67918d..ef26fea9bb6c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_load_balancing_rules_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_load_balancing_rules_list(self, resource_group): response = self.client.load_balancer_load_balancing_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,13 +33,28 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancer_load_balancing_rules_get(self, resource_group): response = await self.client.load_balancer_load_balancing_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", load_balancing_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_load_balancer_load_balancing_rules_begin_health(self, resource_group): + response = await ( + await self.client.load_balancer_load_balancing_rules.begin_health( + group_name="str", + load_balancer_name="str", + load_balancing_rule_name="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations.py index 61b903f16aa0..b6e03a4641e1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_network_interfaces_list(self, resource_group): response = self.client.load_balancer_network_interfaces.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations_async.py index c0d07812e344..70e84942033e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_network_interfaces_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_network_interfaces_list(self, resource_group): response = self.client.load_balancer_network_interfaces.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations.py index de607ed205bc..eb95dc8be683 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_outbound_rules_list(self, resource_group): response = self.client.load_balancer_outbound_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancer_outbound_rules_get(self, resource_group): response = self.client.load_balancer_outbound_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", outbound_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations_async.py index 21cc225dd547..030ee991bb2a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_outbound_rules_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_outbound_rules_list(self, resource_group): response = self.client.load_balancer_outbound_rules.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancer_outbound_rules_get(self, resource_group): response = await self.client.load_balancer_outbound_rules.get( resource_group_name=resource_group.name, load_balancer_name="str", outbound_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations.py index 441022722cda..f65b4fa3444b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancer_probes_list(self, resource_group): response = self.client.load_balancer_probes.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancer_probes_get(self, resource_group): response = self.client.load_balancer_probes.get( resource_group_name=resource_group.name, load_balancer_name="str", probe_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations_async.py index c2404acf2f25..c836bead572f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancer_probes_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancer_probes_list(self, resource_group): response = self.client.load_balancer_probes.list( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancer_probes_get(self, resource_group): response = await self.client.load_balancer_probes.get( resource_group_name=resource_group.name, load_balancer_name="str", probe_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations.py index 142f3ad917ca..6ef0fcb1d72a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_load_balancers_begin_delete(self, resource_group): response = self.client.load_balancers.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancers_get(self, resource_group): response = self.client.load_balancers.get( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_load_balancers_begin_create_or_update(self, resource_group): response = self.client.load_balancers.begin_create_or_update( resource_group_name=resource_group.name, load_balancer_name="str", @@ -173,6 +173,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -266,6 +273,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -659,6 +667,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1193,6 +1202,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1286,6 +1298,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1790,6 +1803,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2385,6 +2399,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2481,6 +2502,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2834,6 +2856,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3333,6 +3356,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3426,6 +3456,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3768,6 +3799,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4253,6 +4285,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4346,6 +4381,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4948,6 +4984,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5688,6 +5725,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5781,6 +5821,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -6491,6 +6532,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -7374,6 +7416,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7467,6 +7516,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -7855,6 +7905,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -8386,6 +8437,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8479,6 +8533,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -8983,6 +9038,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -9575,6 +9631,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9668,6 +9731,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10015,6 +10079,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10502,6 +10567,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10595,6 +10667,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10937,6 +11010,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -11391,7 +11465,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -11399,12 +11473,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_load_balancers_update_tags(self, resource_group): response = self.client.load_balancers.update_tags( resource_group_name=resource_group.name, load_balancer_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -11412,9 +11486,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_load_balancers_list_all(self, resource_group): response = self.client.load_balancers.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -11422,10 +11496,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_load_balancers_list(self, resource_group): response = self.client.load_balancers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -11433,11 +11507,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_swap_public_ip_addresses(self, resource_group): + def test_load_balancers_begin_swap_public_ip_addresses(self, resource_group): response = self.client.load_balancers.begin_swap_public_ip_addresses( location="str", parameters={"frontendIPConfigurations": [{"id": "str", "publicIPAddress": {"id": "str"}}]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -11445,13 +11519,13 @@ def test_begin_swap_public_ip_addresses(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_inbound_nat_rule_port_mappings(self, resource_group): + def test_load_balancers_begin_list_inbound_nat_rule_port_mappings(self, resource_group): response = self.client.load_balancers.begin_list_inbound_nat_rule_port_mappings( group_name="str", load_balancer_name="str", backend_pool_name="str", parameters={"ipAddress": "str", "ipConfiguration": {"id": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -11459,11 +11533,11 @@ def test_begin_list_inbound_nat_rule_port_mappings(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_migrate_to_ip_based(self, resource_group): + def test_load_balancers_migrate_to_ip_based(self, resource_group): response = self.client.load_balancers.migrate_to_ip_based( group_name="str", load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations_async.py index 51315a44b2e0..978902797de2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_load_balancers_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_load_balancers_begin_delete(self, resource_group): response = await ( await self.client.load_balancers.begin_delete( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancers_get(self, resource_group): response = await self.client.load_balancers.get( resource_group_name=resource_group.name, load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_load_balancers_begin_create_or_update(self, resource_group): response = await ( await self.client.load_balancers.begin_create_or_update( resource_group_name=resource_group.name, @@ -177,6 +177,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -270,6 +277,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -663,6 +671,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1197,6 +1206,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1290,6 +1306,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1797,6 +1814,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2400,6 +2418,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2499,6 +2524,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2857,6 +2883,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3368,6 +3395,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3461,6 +3495,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3808,6 +3843,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4296,6 +4332,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4389,6 +4432,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4991,6 +5035,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5739,6 +5784,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5832,6 +5880,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -6546,6 +6595,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -7433,6 +7483,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7526,6 +7583,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -7919,6 +7977,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -8453,6 +8512,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8546,6 +8608,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -9050,6 +9113,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -9645,6 +9709,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9741,6 +9812,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10094,6 +10166,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10593,6 +10666,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10686,6 +10766,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -11028,6 +11109,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -11482,7 +11564,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -11491,12 +11573,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_load_balancers_update_tags(self, resource_group): response = await self.client.load_balancers.update_tags( resource_group_name=resource_group.name, load_balancer_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -11504,9 +11586,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_load_balancers_list_all(self, resource_group): response = self.client.load_balancers.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -11514,10 +11596,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_load_balancers_list(self, resource_group): response = self.client.load_balancers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -11525,12 +11607,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_swap_public_ip_addresses(self, resource_group): + async def test_load_balancers_begin_swap_public_ip_addresses(self, resource_group): response = await ( await self.client.load_balancers.begin_swap_public_ip_addresses( location="str", parameters={"frontendIPConfigurations": [{"id": "str", "publicIPAddress": {"id": "str"}}]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -11539,14 +11621,14 @@ async def test_begin_swap_public_ip_addresses(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_inbound_nat_rule_port_mappings(self, resource_group): + async def test_load_balancers_begin_list_inbound_nat_rule_port_mappings(self, resource_group): response = await ( await self.client.load_balancers.begin_list_inbound_nat_rule_port_mappings( group_name="str", load_balancer_name="str", backend_pool_name="str", parameters={"ipAddress": "str", "ipConfiguration": {"id": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -11555,11 +11637,11 @@ async def test_begin_list_inbound_nat_rule_port_mappings(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_migrate_to_ip_based(self, resource_group): + async def test_load_balancers_migrate_to_ip_based(self, resource_group): response = await self.client.load_balancers.migrate_to_ip_based( group_name="str", load_balancer_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations.py index df21ea6f4ec3..45d2871ab8ea 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_local_network_gateways_begin_create_or_update(self, resource_group): response = self.client.local_network_gateways.begin_create_or_update( resource_group_name=resource_group.name, local_network_gateway_name="str", @@ -42,7 +42,12 @@ def test_begin_create_or_update(self, resource_group): "fqdn": "str", "gatewayIpAddress": "str", "id": "str", - "localNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "location": "str", "name": "str", "provisioningState": "str", @@ -50,7 +55,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -58,11 +63,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_local_network_gateways_get(self, resource_group): response = self.client.local_network_gateways.get( resource_group_name=resource_group.name, local_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -70,11 +75,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_local_network_gateways_begin_delete(self, resource_group): response = self.client.local_network_gateways.begin_delete( resource_group_name=resource_group.name, local_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,12 +87,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_local_network_gateways_update_tags(self, resource_group): response = self.client.local_network_gateways.update_tags( resource_group_name=resource_group.name, local_network_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -95,10 +100,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_local_network_gateways_list(self, resource_group): response = self.client.local_network_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations_async.py index b98b2879be21..71979b17a87e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_local_network_gateways_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_local_network_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.local_network_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -44,7 +44,12 @@ async def test_begin_create_or_update(self, resource_group): "fqdn": "str", "gatewayIpAddress": "str", "id": "str", - "localNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "location": "str", "name": "str", "provisioningState": "str", @@ -52,7 +57,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -61,11 +66,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_local_network_gateways_get(self, resource_group): response = await self.client.local_network_gateways.get( resource_group_name=resource_group.name, local_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -73,12 +78,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_local_network_gateways_begin_delete(self, resource_group): response = await ( await self.client.local_network_gateways.begin_delete( resource_group_name=resource_group.name, local_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -87,12 +92,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_local_network_gateways_update_tags(self, resource_group): response = await self.client.local_network_gateways.update_tags( resource_group_name=resource_group.name, local_network_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -100,10 +105,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_local_network_gateways_list(self, resource_group): response = self.client.local_network_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations.py index 525827e47a04..34b8dcacdd27 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_management_group_network_manager_connections_create_or_update(self, resource_group): response = self.client.management_group_network_manager_connections.create_or_update( management_group_id="str", network_manager_connection_name="str", @@ -41,7 +41,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,11 +49,11 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_management_group_network_manager_connections_get(self, resource_group): response = self.client.management_group_network_manager_connections.get( management_group_id="str", network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -61,11 +61,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_management_group_network_manager_connections_delete(self, resource_group): response = self.client.management_group_network_manager_connections.delete( management_group_id="str", network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -73,10 +73,10 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_management_group_network_manager_connections_list(self, resource_group): response = self.client.management_group_network_manager_connections.list( management_group_id="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations_async.py index febcb6105327..0c6e2c39342d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_management_group_network_manager_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_management_group_network_manager_connections_create_or_update(self, resource_group): response = await self.client.management_group_network_manager_connections.create_or_update( management_group_id="str", network_manager_connection_name="str", @@ -42,7 +42,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -50,11 +50,11 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_management_group_network_manager_connections_get(self, resource_group): response = await self.client.management_group_network_manager_connections.get( management_group_id="str", network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -62,11 +62,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_management_group_network_manager_connections_delete(self, resource_group): response = await self.client.management_group_network_manager_connections.delete( management_group_id="str", network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -74,10 +74,10 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_management_group_network_manager_connections_list(self, resource_group): response = self.client.management_group_network_manager_connections.list( management_group_id="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations.py index 4f36799e25ca..5d14c1e10ee4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_nat_gateways_begin_delete(self, resource_group): response = self.client.nat_gateways.begin_delete( resource_group_name=resource_group.name, nat_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_nat_gateways_get(self, resource_group): response = self.client.nat_gateways.get( resource_group_name=resource_group.name, nat_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_nat_gateways_begin_create_or_update(self, resource_group): response = self.client.nat_gateways.begin_create_or_update( resource_group_name=resource_group.name, nat_gateway_name="str", @@ -64,7 +64,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -72,12 +72,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_nat_gateways_update_tags(self, resource_group): response = self.client.nat_gateways.update_tags( resource_group_name=resource_group.name, nat_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -85,9 +85,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_nat_gateways_list_all(self, resource_group): response = self.client.nat_gateways.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -95,10 +95,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_nat_gateways_list(self, resource_group): response = self.client.nat_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations_async.py index 91d80f2cb45e..09aed4cbb2eb 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_gateways_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_nat_gateways_begin_delete(self, resource_group): response = await ( await self.client.nat_gateways.begin_delete( resource_group_name=resource_group.name, nat_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_nat_gateways_get(self, resource_group): response = await self.client.nat_gateways.get( resource_group_name=resource_group.name, nat_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_nat_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.nat_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -68,7 +68,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -77,12 +77,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_nat_gateways_update_tags(self, resource_group): response = await self.client.nat_gateways.update_tags( resource_group_name=resource_group.name, nat_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -90,9 +90,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_nat_gateways_list_all(self, resource_group): response = self.client.nat_gateways.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -100,10 +100,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_nat_gateways_list(self, resource_group): response = self.client.nat_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations.py index c28cec33b87d..04aa884e6864 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_nat_rules_get(self, resource_group): response = self.client.nat_rules.get( resource_group_name=resource_group.name, gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_nat_rules_begin_create_or_update(self, resource_group): response = self.client.nat_rules.begin_create_or_update( resource_group_name=resource_group.name, gateway_name="str", @@ -51,7 +51,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -59,12 +59,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_nat_rules_begin_delete(self, resource_group): response = self.client.nat_rules.begin_delete( resource_group_name=resource_group.name, gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -72,11 +72,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_vpn_gateway(self, resource_group): + def test_nat_rules_list_by_vpn_gateway(self, resource_group): response = self.client.nat_rules.list_by_vpn_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations_async.py index 1a0676f229e7..13e28aafbbda 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_nat_rules_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_nat_rules_get(self, resource_group): response = await self.client.nat_rules.get( resource_group_name=resource_group.name, gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_nat_rules_begin_create_or_update(self, resource_group): response = await ( await self.client.nat_rules.begin_create_or_update( resource_group_name=resource_group.name, @@ -53,7 +53,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -62,13 +62,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_nat_rules_begin_delete(self, resource_group): response = await ( await self.client.nat_rules.begin_delete( resource_group_name=resource_group.name, gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -77,11 +77,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_vpn_gateway(self, resource_group): + async def test_nat_rules_list_by_vpn_gateway(self, resource_group): response = self.client.nat_rules.list_by_vpn_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations.py index 2a9d1ba50093..7f0dd897ad72 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_groups_get(self, resource_group): response = self.client.network_groups.get( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_network_groups_create_or_update(self, resource_group): response = self.client.network_groups.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -56,7 +56,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -64,12 +64,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_groups_begin_delete(self, resource_group): response = self.client.network_groups.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -77,11 +77,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_groups_list(self, resource_group): response = self.client.network_groups.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations_async.py index fa000ce1841b..f94472c58f17 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_groups_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_groups_get(self, resource_group): response = await self.client.network_groups.get( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_network_groups_create_or_update(self, resource_group): response = await self.client.network_groups.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -57,7 +57,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -65,13 +65,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_groups_begin_delete(self, resource_group): response = await ( await self.client.network_groups.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -80,11 +80,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_groups_list(self, resource_group): response = self.client.network_groups.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations.py index 8d2c66b297ef..d4e9169ea64c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_interface_ip_configurations_list(self, resource_group): response = self.client.network_interface_ip_configurations.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_interface_ip_configurations_get(self, resource_group): response = self.client.network_interface_ip_configurations.get( resource_group_name=resource_group.name, network_interface_name="str", ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations_async.py index be31ebef5ed1..3f9e41e30906 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_ip_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_interface_ip_configurations_list(self, resource_group): response = self.client.network_interface_ip_configurations.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_interface_ip_configurations_get(self, resource_group): response = await self.client.network_interface_ip_configurations.get( resource_group_name=resource_group.name, network_interface_name="str", ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations.py index 13f813a17074..e272f10ea7ac 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_interface_load_balancers_list(self, resource_group): response = self.client.network_interface_load_balancers.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations_async.py index f9c413014b0f..cace34627f5a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_load_balancers_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_interface_load_balancers_list(self, resource_group): response = self.client.network_interface_load_balancers.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations.py index a5a02a75dece..59317ee4c0dd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_interface_tap_configurations_begin_delete(self, resource_group): response = self.client.network_interface_tap_configurations.begin_delete( resource_group_name=resource_group.name, network_interface_name="str", tap_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_interface_tap_configurations_get(self, resource_group): response = self.client.network_interface_tap_configurations.get( resource_group_name=resource_group.name, network_interface_name="str", tap_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_network_interface_tap_configurations_begin_create_or_update(self, resource_group): response = self.client.network_interface_tap_configurations.begin_create_or_update( resource_group_name=resource_group.name, network_interface_name="str", @@ -132,6 +132,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -225,6 +228,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -668,6 +672,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1249,6 +1254,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1342,6 +1350,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1835,6 +1844,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2496,6 +2506,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2589,6 +2602,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2937,6 +2951,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3422,6 +3437,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3515,6 +3533,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3919,6 +3938,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4348,7 +4368,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", }, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -4356,11 +4376,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_interface_tap_configurations_list(self, resource_group): response = self.client.network_interface_tap_configurations.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations_async.py index 10ceca1074b8..26cb06a2e99f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interface_tap_configurations_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_interface_tap_configurations_begin_delete(self, resource_group): response = await ( await self.client.network_interface_tap_configurations.begin_delete( resource_group_name=resource_group.name, network_interface_name="str", tap_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_interface_tap_configurations_get(self, resource_group): response = await self.client.network_interface_tap_configurations.get( resource_group_name=resource_group.name, network_interface_name="str", tap_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_network_interface_tap_configurations_begin_create_or_update(self, resource_group): response = await ( await self.client.network_interface_tap_configurations.begin_create_or_update( resource_group_name=resource_group.name, @@ -136,6 +136,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -229,6 +236,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -672,6 +680,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1259,6 +1268,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1352,6 +1364,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1849,6 +1862,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2516,6 +2530,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2609,6 +2630,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2957,6 +2979,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3448,6 +3471,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3541,6 +3567,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3947,6 +3974,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4376,7 +4404,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", }, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -4385,11 +4413,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_interface_tap_configurations_list(self, resource_group): response = self.client.network_interface_tap_configurations.list( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations.py index a7fcee01828b..387ba39d16bb 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_cloud_service_role_instance_network_interfaces(self, resource_group): + def test_network_interfaces_list_cloud_service_role_instance_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_cloud_service_role_instance_network_interfaces( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,11 +33,11 @@ def test_list_cloud_service_role_instance_network_interfaces(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_cloud_service_network_interfaces(self, resource_group): + def test_network_interfaces_list_cloud_service_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_cloud_service_network_interfaces( resource_group_name=resource_group.name, cloud_service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -45,13 +45,13 @@ def test_list_cloud_service_network_interfaces(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_cloud_service_network_interface(self, resource_group): + def test_network_interfaces_get_cloud_service_network_interface(self, resource_group): response = self.client.network_interfaces.get_cloud_service_network_interface( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -59,11 +59,11 @@ def test_get_cloud_service_network_interface(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_interfaces_begin_delete(self, resource_group): response = self.client.network_interfaces.begin_delete( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -71,11 +71,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_interfaces_get(self, resource_group): response = self.client.network_interfaces.get( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -83,13 +83,14 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_network_interfaces_begin_create_or_update(self, resource_group): response = self.client.network_interfaces.begin_create_or_update( resource_group_name=resource_group.name, network_interface_name="str", parameters={ "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -259,6 +260,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -694,6 +698,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1077,6 +1084,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1516,6 +1530,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2084,6 +2105,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2419,6 +2443,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2773,6 +2800,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3157,6 +3187,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3596,6 +3633,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4080,6 +4120,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4418,6 +4461,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4857,6 +4907,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5321,6 +5374,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5759,6 +5819,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6086,7 +6149,7 @@ def test_begin_create_or_update(self, resource_group): "vnetEncryptionSupported": bool, "workloadType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -6094,12 +6157,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_network_interfaces_update_tags(self, resource_group): response = self.client.network_interfaces.update_tags( resource_group_name=resource_group.name, network_interface_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -6107,9 +6170,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_network_interfaces_list_all(self, resource_group): response = self.client.network_interfaces.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -6117,10 +6180,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_interfaces_list(self, resource_group): response = self.client.network_interfaces.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -6128,11 +6191,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_effective_route_table(self, resource_group): + def test_network_interfaces_begin_get_effective_route_table(self, resource_group): response = self.client.network_interfaces.begin_get_effective_route_table( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -6140,11 +6203,11 @@ def test_begin_get_effective_route_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_effective_network_security_groups(self, resource_group): + def test_network_interfaces_begin_list_effective_network_security_groups(self, resource_group): response = self.client.network_interfaces.begin_list_effective_network_security_groups( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -6152,7 +6215,7 @@ def test_begin_list_effective_network_security_groups(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_virtual_machine_scale_set_vm_network_interfaces(self, resource_group): + def test_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_vm_network_interfaces( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6165,7 +6228,7 @@ def test_list_virtual_machine_scale_set_vm_network_interfaces(self, resource_gro @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_virtual_machine_scale_set_network_interfaces(self, resource_group): + def test_network_interfaces_list_virtual_machine_scale_set_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_network_interfaces( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6177,7 +6240,7 @@ def test_list_virtual_machine_scale_set_network_interfaces(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_virtual_machine_scale_set_network_interface(self, resource_group): + def test_network_interfaces_get_virtual_machine_scale_set_network_interface(self, resource_group): response = self.client.network_interfaces.get_virtual_machine_scale_set_network_interface( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6191,7 +6254,7 @@ def test_get_virtual_machine_scale_set_network_interface(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_virtual_machine_scale_set_ip_configurations(self, resource_group): + def test_network_interfaces_list_virtual_machine_scale_set_ip_configurations(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_ip_configurations( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6205,7 +6268,7 @@ def test_list_virtual_machine_scale_set_ip_configurations(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_virtual_machine_scale_set_ip_configuration(self, resource_group): + def test_network_interfaces_get_virtual_machine_scale_set_ip_configuration(self, resource_group): response = self.client.network_interfaces.get_virtual_machine_scale_set_ip_configuration( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations_async.py index 093ad02f15e8..79d61698e692 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_interfaces_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_cloud_service_role_instance_network_interfaces(self, resource_group): + async def test_network_interfaces_list_cloud_service_role_instance_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_cloud_service_role_instance_network_interfaces( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,11 +34,11 @@ async def test_list_cloud_service_role_instance_network_interfaces(self, resourc @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_cloud_service_network_interfaces(self, resource_group): + async def test_network_interfaces_list_cloud_service_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_cloud_service_network_interfaces( resource_group_name=resource_group.name, cloud_service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -46,13 +46,13 @@ async def test_list_cloud_service_network_interfaces(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_cloud_service_network_interface(self, resource_group): + async def test_network_interfaces_get_cloud_service_network_interface(self, resource_group): response = await self.client.network_interfaces.get_cloud_service_network_interface( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -60,12 +60,12 @@ async def test_get_cloud_service_network_interface(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_interfaces_begin_delete(self, resource_group): response = await ( await self.client.network_interfaces.begin_delete( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_interfaces_get(self, resource_group): response = await self.client.network_interfaces.get( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -86,7 +86,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_network_interfaces_begin_create_or_update(self, resource_group): response = await ( await self.client.network_interfaces.begin_create_or_update( resource_group_name=resource_group.name, @@ -94,6 +94,7 @@ async def test_begin_create_or_update(self, resource_group): parameters={ "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -265,6 +266,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -703,6 +711,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1089,6 +1100,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1530,6 +1548,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2101,6 +2126,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2436,6 +2464,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2792,6 +2823,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3176,6 +3210,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3615,6 +3656,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4099,6 +4143,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4437,6 +4488,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4876,6 +4934,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5344,6 +5409,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5782,6 +5854,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6109,7 +6188,7 @@ async def test_begin_create_or_update(self, resource_group): "vnetEncryptionSupported": bool, "workloadType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -6118,12 +6197,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_network_interfaces_update_tags(self, resource_group): response = await self.client.network_interfaces.update_tags( resource_group_name=resource_group.name, network_interface_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -6131,9 +6210,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_network_interfaces_list_all(self, resource_group): response = self.client.network_interfaces.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -6141,10 +6220,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_interfaces_list(self, resource_group): response = self.client.network_interfaces.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -6152,12 +6231,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_effective_route_table(self, resource_group): + async def test_network_interfaces_begin_get_effective_route_table(self, resource_group): response = await ( await self.client.network_interfaces.begin_get_effective_route_table( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -6166,12 +6245,12 @@ async def test_begin_get_effective_route_table(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_effective_network_security_groups(self, resource_group): + async def test_network_interfaces_begin_list_effective_network_security_groups(self, resource_group): response = await ( await self.client.network_interfaces.begin_list_effective_network_security_groups( resource_group_name=resource_group.name, network_interface_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -6180,7 +6259,7 @@ async def test_begin_list_effective_network_security_groups(self, resource_group @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_virtual_machine_scale_set_vm_network_interfaces(self, resource_group): + async def test_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_vm_network_interfaces( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6193,7 +6272,7 @@ async def test_list_virtual_machine_scale_set_vm_network_interfaces(self, resour @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_virtual_machine_scale_set_network_interfaces(self, resource_group): + async def test_network_interfaces_list_virtual_machine_scale_set_network_interfaces(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_network_interfaces( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6205,7 +6284,7 @@ async def test_list_virtual_machine_scale_set_network_interfaces(self, resource_ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_virtual_machine_scale_set_network_interface(self, resource_group): + async def test_network_interfaces_get_virtual_machine_scale_set_network_interface(self, resource_group): response = await self.client.network_interfaces.get_virtual_machine_scale_set_network_interface( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6219,7 +6298,7 @@ async def test_get_virtual_machine_scale_set_network_interface(self, resource_gr @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_virtual_machine_scale_set_ip_configurations(self, resource_group): + async def test_network_interfaces_list_virtual_machine_scale_set_ip_configurations(self, resource_group): response = self.client.network_interfaces.list_virtual_machine_scale_set_ip_configurations( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -6233,7 +6312,7 @@ async def test_list_virtual_machine_scale_set_ip_configurations(self, resource_g @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_virtual_machine_scale_set_ip_configuration(self, resource_group): + async def test_network_interfaces_get_virtual_machine_scale_set_ip_configuration(self, resource_group): response = await self.client.network_interfaces.get_virtual_machine_scale_set_ip_configuration( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations.py index 2998117bc00f..ab573c675e49 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_post(self, resource_group): + def test_network_manager_commits_begin_post(self, resource_group): response = self.client.network_manager_commits.begin_post( resource_group_name=resource_group.name, network_manager_name="str", @@ -30,7 +30,7 @@ def test_begin_post(self, resource_group): "commitId": "str", "configurationIds": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations_async.py index cbff471fa760..5d488a48e9b9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_commits_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_post(self, resource_group): + async def test_network_manager_commits_begin_post(self, resource_group): response = await ( await self.client.network_manager_commits.begin_post( resource_group_name=resource_group.name, @@ -32,7 +32,7 @@ async def test_begin_post(self, resource_group): "commitId": "str", "configurationIds": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations.py index 54389829398e..f59dd9b97e65 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_manager_deployment_status_list(self, resource_group): response = self.client.network_manager_deployment_status.list( resource_group_name=resource_group.name, network_manager_name="str", parameters={"deploymentTypes": ["str"], "regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations_async.py index 556364501953..6964c68063e0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_deployment_status_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_manager_deployment_status_list(self, resource_group): response = await self.client.network_manager_deployment_status.list( resource_group_name=resource_group.name, network_manager_name="str", parameters={"deploymentTypes": ["str"], "regions": ["str"], "skipToken": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations.py index b9b02e8e3011..575c69c01040 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_manager_routing_configurations_list(self, resource_group): response = self.client.network_manager_routing_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_manager_routing_configurations_get(self, resource_group): response = self.client.network_manager_routing_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_network_manager_routing_configurations_create_or_update(self, resource_group): response = self.client.network_manager_routing_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -67,7 +67,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -75,12 +75,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_manager_routing_configurations_begin_delete(self, resource_group): response = self.client.network_manager_routing_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations_async.py index 4599df4b95f2..6b448bea27c6 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_manager_routing_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_manager_routing_configurations_list(self, resource_group): response = self.client.network_manager_routing_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_manager_routing_configurations_get(self, resource_group): response = await self.client.network_manager_routing_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_network_manager_routing_configurations_create_or_update(self, resource_group): response = await self.client.network_manager_routing_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -68,7 +68,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -76,13 +76,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_manager_routing_configurations_begin_delete(self, resource_group): response = await ( await self.client.network_manager_routing_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations.py index 481134cd035e..d1b11453f754 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_managers_get(self, resource_group): response = self.client.network_managers.get( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_network_managers_create_or_update(self, resource_group): response = self.client.network_managers.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -61,7 +61,7 @@ def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_managers_begin_delete(self, resource_group): response = self.client.network_managers.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,12 +81,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_patch(self, resource_group): + def test_network_managers_patch(self, resource_group): response = self.client.network_managers.patch( resource_group_name=resource_group.name, network_manager_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -94,9 +94,9 @@ def test_patch(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_network_managers_list_by_subscription(self, resource_group): response = self.client.network_managers.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -104,10 +104,10 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_managers_list(self, resource_group): response = self.client.network_managers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations_async.py index 34c61a6d46e4..27cb49aa8110 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_managers_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_managers_get(self, resource_group): response = await self.client.network_managers.get( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_network_managers_create_or_update(self, resource_group): response = await self.client.network_managers.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -62,7 +62,7 @@ async def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -70,12 +70,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_managers_begin_delete(self, resource_group): response = await ( await self.client.network_managers.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -84,12 +84,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_patch(self, resource_group): + async def test_network_managers_patch(self, resource_group): response = await self.client.network_managers.patch( resource_group_name=resource_group.name, network_manager_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -97,9 +97,9 @@ async def test_patch(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_network_managers_list_by_subscription(self, resource_group): response = self.client.network_managers.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -107,10 +107,10 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_managers_list(self, resource_group): response = self.client.network_managers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations.py index 0fe17a89ac74..8fffc6ac455b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_profiles_begin_delete(self, resource_group): response = self.client.network_profiles.begin_delete( resource_group_name=resource_group.name, network_profile_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_profiles_get(self, resource_group): response = self.client.network_profiles.get( resource_group_name=resource_group.name, network_profile_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_network_profiles_create_or_update(self, resource_group): response = self.client.network_profiles.create_or_update( resource_group_name=resource_group.name, network_profile_name="str", @@ -150,6 +150,9 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -243,6 +246,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1194,6 +1198,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2272,6 +2277,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2365,6 +2377,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3324,6 +3337,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4329,7 +4343,7 @@ def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4337,12 +4351,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_network_profiles_update_tags(self, resource_group): response = self.client.network_profiles.update_tags( resource_group_name=resource_group.name, network_profile_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4350,9 +4364,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_network_profiles_list_all(self, resource_group): response = self.client.network_profiles.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -4360,10 +4374,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_profiles_list(self, resource_group): response = self.client.network_profiles.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations_async.py index e65f999ceef2..85b6aff4712e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_profiles_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_profiles_begin_delete(self, resource_group): response = await ( await self.client.network_profiles.begin_delete( resource_group_name=resource_group.name, network_profile_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_profiles_get(self, resource_group): response = await self.client.network_profiles.get( resource_group_name=resource_group.name, network_profile_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_network_profiles_create_or_update(self, resource_group): response = await self.client.network_profiles.create_or_update( resource_group_name=resource_group.name, network_profile_name="str", @@ -153,6 +153,9 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -246,6 +249,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1197,6 +1201,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2275,6 +2280,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2368,6 +2380,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3327,6 +3340,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4332,7 +4346,7 @@ async def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4340,12 +4354,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_network_profiles_update_tags(self, resource_group): response = await self.client.network_profiles.update_tags( resource_group_name=resource_group.name, network_profile_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4353,9 +4367,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_network_profiles_list_all(self, resource_group): response = self.client.network_profiles.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -4363,10 +4377,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_profiles_list(self, resource_group): response = self.client.network_profiles.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations.py index bf369995508f..ef013bf36c77 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_security_groups_begin_delete(self, resource_group): response = self.client.network_security_groups.begin_delete( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_security_groups_get(self, resource_group): response = self.client.network_security_groups.get( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_network_security_groups_begin_create_or_update(self, resource_group): response = self.client.network_security_groups.begin_create_or_update( resource_group_name=resource_group.name, network_security_group_name="str", @@ -137,6 +137,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -308,6 +309,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -607,6 +615,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -854,6 +865,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1156,6 +1174,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1522,6 +1547,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1739,6 +1767,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1984,6 +2019,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2284,6 +2326,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2629,6 +2678,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2831,6 +2887,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3133,6 +3196,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3465,6 +3535,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3766,6 +3843,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -4100,6 +4184,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -4156,6 +4243,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4971,7 +5059,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -4979,12 +5067,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_network_security_groups_update_tags(self, resource_group): response = self.client.network_security_groups.update_tags( resource_group_name=resource_group.name, network_security_group_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4992,9 +5080,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_network_security_groups_list_all(self, resource_group): response = self.client.network_security_groups.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -5002,10 +5090,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_security_groups_list(self, resource_group): response = self.client.network_security_groups.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations_async.py index 7acea4b2d10b..104437324f43 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_security_groups_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_security_groups_begin_delete(self, resource_group): response = await ( await self.client.network_security_groups.begin_delete( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_security_groups_get(self, resource_group): response = await self.client.network_security_groups.get( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_network_security_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.network_security_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -141,6 +141,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -316,6 +317,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -615,6 +623,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -862,6 +877,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1164,6 +1186,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1532,6 +1561,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1749,6 +1781,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -1997,6 +2036,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2299,6 +2345,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2644,6 +2697,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2846,6 +2906,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3148,6 +3215,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3480,6 +3554,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -3781,6 +3862,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -4115,6 +4203,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -4171,6 +4262,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4988,7 +5080,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -4997,12 +5089,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_network_security_groups_update_tags(self, resource_group): response = await self.client.network_security_groups.update_tags( resource_group_name=resource_group.name, network_security_group_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -5010,9 +5102,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_network_security_groups_list_all(self, resource_group): response = self.client.network_security_groups.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -5020,10 +5112,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_security_groups_list(self, resource_group): response = self.client.network_security_groups.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations.py index 28679678f8e2..3cc7353d07e9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_network_virtual_appliance_connections_begin_create_or_update(self, resource_group): response = self.client.network_virtual_appliance_connections.begin_create_or_update( resource_group_name=resource_group.name, network_virtual_appliance_name="str", @@ -45,7 +45,7 @@ def test_begin_create_or_update(self, resource_group): }, "tunnelIdentifier": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -53,12 +53,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_virtual_appliance_connections_get(self, resource_group): response = self.client.network_virtual_appliance_connections.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -66,12 +66,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_virtual_appliance_connections_begin_delete(self, resource_group): response = self.client.network_virtual_appliance_connections.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -79,11 +79,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_virtual_appliance_connections_list(self, resource_group): response = self.client.network_virtual_appliance_connections.list( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations_async.py index 6844f7544a30..cd9026e2aa78 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliance_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_network_virtual_appliance_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.network_virtual_appliance_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -50,7 +50,7 @@ async def test_begin_create_or_update(self, resource_group): }, "tunnelIdentifier": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -59,12 +59,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_virtual_appliance_connections_get(self, resource_group): response = await self.client.network_virtual_appliance_connections.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -72,13 +72,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_virtual_appliance_connections_begin_delete(self, resource_group): response = await ( await self.client.network_virtual_appliance_connections.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -87,11 +87,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_virtual_appliance_connections_list(self, resource_group): response = self.client.network_virtual_appliance_connections.list( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations.py index 00942003d29a..fe03988a8076 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_virtual_appliances_begin_delete(self, resource_group): response = self.client.network_virtual_appliances.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_virtual_appliances_get(self, resource_group): response = self.client.network_virtual_appliances.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,12 +44,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_network_virtual_appliances_update_tags(self, resource_group): response = self.client.network_virtual_appliances.update_tags( resource_group_name=resource_group.name, network_virtual_appliance_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_network_virtual_appliances_begin_create_or_update(self, resource_group): response = self.client.network_virtual_appliances.begin_create_or_update( resource_group_name=resource_group.name, network_virtual_appliance_name="str", @@ -113,7 +113,7 @@ def test_begin_create_or_update(self, resource_group): "virtualApplianceSites": [{"id": "str"}], "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -121,11 +121,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_restart(self, resource_group): + def test_network_virtual_appliances_begin_restart(self, resource_group): response = self.client.network_virtual_appliances.begin_restart( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -133,10 +133,10 @@ def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_network_virtual_appliances_list_by_resource_group(self, resource_group): response = self.client.network_virtual_appliances.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -144,9 +144,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_virtual_appliances_list(self, resource_group): response = self.client.network_virtual_appliances.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations_async.py index 49241c92e23d..b9d09cdecb21 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_virtual_appliances_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_virtual_appliances_begin_delete(self, resource_group): response = await ( await self.client.network_virtual_appliances.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_virtual_appliances_get(self, resource_group): response = await self.client.network_virtual_appliances.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,12 +47,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_network_virtual_appliances_update_tags(self, resource_group): response = await self.client.network_virtual_appliances.update_tags( resource_group_name=resource_group.name, network_virtual_appliance_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -60,7 +60,7 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_network_virtual_appliances_begin_create_or_update(self, resource_group): response = await ( await self.client.network_virtual_appliances.begin_create_or_update( resource_group_name=resource_group.name, @@ -117,7 +117,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualApplianceSites": [{"id": "str"}], "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -126,12 +126,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_restart(self, resource_group): + async def test_network_virtual_appliances_begin_restart(self, resource_group): response = await ( await self.client.network_virtual_appliances.begin_restart( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -140,10 +140,10 @@ async def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_network_virtual_appliances_list_by_resource_group(self, resource_group): response = self.client.network_virtual_appliances.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -151,9 +151,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_virtual_appliances_list(self, resource_group): response = self.client.network_virtual_appliances.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations.py index a6d163e0b414..8be5281c71d4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_network_watchers_create_or_update(self, resource_group): response = self.client.network_watchers.create_or_update( resource_group_name=resource_group.name, network_watcher_name="str", @@ -33,7 +33,7 @@ def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -41,11 +41,11 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_network_watchers_get(self, resource_group): response = self.client.network_watchers.get( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -53,11 +53,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_network_watchers_begin_delete(self, resource_group): response = self.client.network_watchers.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -65,12 +65,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_network_watchers_update_tags(self, resource_group): response = self.client.network_watchers.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -78,10 +78,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_network_watchers_list(self, resource_group): response = self.client.network_watchers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -89,9 +89,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_network_watchers_list_all(self, resource_group): response = self.client.network_watchers.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_topology(self, resource_group): + def test_network_watchers_get_topology(self, resource_group): response = self.client.network_watchers.get_topology( resource_group_name=resource_group.name, network_watcher_name="str", @@ -108,7 +108,7 @@ def test_get_topology(self, resource_group): "targetSubnet": {"id": "str"}, "targetVirtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -116,7 +116,7 @@ def test_get_topology(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_verify_ip_flow(self, resource_group): + def test_network_watchers_begin_verify_ip_flow(self, resource_group): response = self.client.network_watchers.begin_verify_ip_flow( resource_group_name=resource_group.name, network_watcher_name="str", @@ -130,7 +130,7 @@ def test_begin_verify_ip_flow(self, resource_group): "targetResourceId": "str", "targetNicResourceId": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -138,7 +138,7 @@ def test_begin_verify_ip_flow(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_next_hop(self, resource_group): + def test_network_watchers_begin_get_next_hop(self, resource_group): response = self.client.network_watchers.begin_get_next_hop( resource_group_name=resource_group.name, network_watcher_name="str", @@ -148,7 +148,7 @@ def test_begin_get_next_hop(self, resource_group): "targetResourceId": "str", "targetNicResourceId": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -156,12 +156,12 @@ def test_begin_get_next_hop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_vm_security_rules(self, resource_group): + def test_network_watchers_begin_get_vm_security_rules(self, resource_group): response = self.client.network_watchers.begin_get_vm_security_rules( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -169,12 +169,12 @@ def test_begin_get_vm_security_rules(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_troubleshooting(self, resource_group): + def test_network_watchers_begin_get_troubleshooting(self, resource_group): response = self.client.network_watchers.begin_get_troubleshooting( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"storageId": "str", "storagePath": "str", "targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -182,12 +182,12 @@ def test_begin_get_troubleshooting(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_troubleshooting_result(self, resource_group): + def test_network_watchers_begin_get_troubleshooting_result(self, resource_group): response = self.client.network_watchers.begin_get_troubleshooting_result( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -195,7 +195,7 @@ def test_begin_get_troubleshooting_result(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_set_flow_log_configuration(self, resource_group): + def test_network_watchers_begin_set_flow_log_configuration(self, resource_group): response = self.client.network_watchers.begin_set_flow_log_configuration( resource_group_name=resource_group.name, network_watcher_name="str", @@ -222,7 +222,7 @@ def test_begin_set_flow_log_configuration(self, resource_group): }, "retentionPolicy": {"days": 0, "enabled": False}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -230,12 +230,12 @@ def test_begin_set_flow_log_configuration(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_flow_log_status(self, resource_group): + def test_network_watchers_begin_get_flow_log_status(self, resource_group): response = self.client.network_watchers.begin_get_flow_log_status( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -243,7 +243,7 @@ def test_begin_get_flow_log_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_check_connectivity(self, resource_group): + def test_network_watchers_begin_check_connectivity(self, resource_group): response = self.client.network_watchers.begin_check_connectivity( resource_group_name=resource_group.name, network_watcher_name="str", @@ -260,7 +260,7 @@ def test_begin_check_connectivity(self, resource_group): } }, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -268,7 +268,7 @@ def test_begin_check_connectivity(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_azure_reachability_report(self, resource_group): + def test_network_watchers_begin_get_azure_reachability_report(self, resource_group): response = self.client.network_watchers.begin_get_azure_reachability_report( resource_group_name=resource_group.name, network_watcher_name="str", @@ -279,7 +279,7 @@ def test_begin_get_azure_reachability_report(self, resource_group): "azureLocations": ["str"], "providers": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -287,12 +287,12 @@ def test_begin_get_azure_reachability_report(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_available_providers(self, resource_group): + def test_network_watchers_begin_list_available_providers(self, resource_group): response = self.client.network_watchers.begin_list_available_providers( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"azureLocations": ["str"], "city": "str", "country": "str", "state": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -300,7 +300,7 @@ def test_begin_list_available_providers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_network_configuration_diagnostic(self, resource_group): + def test_network_watchers_begin_get_network_configuration_diagnostic(self, resource_group): response = self.client.network_watchers.begin_get_network_configuration_diagnostic( resource_group_name=resource_group.name, network_watcher_name="str", @@ -317,7 +317,7 @@ def test_begin_get_network_configuration_diagnostic(self, resource_group): "targetResourceId": "str", "verbosityLevel": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations_async.py index d70011cfdaf1..fe802cb45072 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_network_watchers_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_network_watchers_create_or_update(self, resource_group): response = await self.client.network_watchers.create_or_update( resource_group_name=resource_group.name, network_watcher_name="str", @@ -34,7 +34,7 @@ async def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -42,11 +42,11 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_network_watchers_get(self, resource_group): response = await self.client.network_watchers.get( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -54,12 +54,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_network_watchers_begin_delete(self, resource_group): response = await ( await self.client.network_watchers.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -68,12 +68,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_network_watchers_update_tags(self, resource_group): response = await self.client.network_watchers.update_tags( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,10 +81,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_network_watchers_list(self, resource_group): response = self.client.network_watchers.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -92,9 +92,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_network_watchers_list_all(self, resource_group): response = self.client.network_watchers.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -102,7 +102,7 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_topology(self, resource_group): + async def test_network_watchers_get_topology(self, resource_group): response = await self.client.network_watchers.get_topology( resource_group_name=resource_group.name, network_watcher_name="str", @@ -111,7 +111,7 @@ async def test_get_topology(self, resource_group): "targetSubnet": {"id": "str"}, "targetVirtualNetwork": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -119,7 +119,7 @@ async def test_get_topology(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_verify_ip_flow(self, resource_group): + async def test_network_watchers_begin_verify_ip_flow(self, resource_group): response = await ( await self.client.network_watchers.begin_verify_ip_flow( resource_group_name=resource_group.name, @@ -134,7 +134,7 @@ async def test_begin_verify_ip_flow(self, resource_group): "targetResourceId": "str", "targetNicResourceId": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -143,7 +143,7 @@ async def test_begin_verify_ip_flow(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_next_hop(self, resource_group): + async def test_network_watchers_begin_get_next_hop(self, resource_group): response = await ( await self.client.network_watchers.begin_get_next_hop( resource_group_name=resource_group.name, @@ -154,7 +154,7 @@ async def test_begin_get_next_hop(self, resource_group): "targetResourceId": "str", "targetNicResourceId": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -163,13 +163,13 @@ async def test_begin_get_next_hop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_vm_security_rules(self, resource_group): + async def test_network_watchers_begin_get_vm_security_rules(self, resource_group): response = await ( await self.client.network_watchers.begin_get_vm_security_rules( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -178,13 +178,13 @@ async def test_begin_get_vm_security_rules(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_troubleshooting(self, resource_group): + async def test_network_watchers_begin_get_troubleshooting(self, resource_group): response = await ( await self.client.network_watchers.begin_get_troubleshooting( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"storageId": "str", "storagePath": "str", "targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -193,13 +193,13 @@ async def test_begin_get_troubleshooting(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_troubleshooting_result(self, resource_group): + async def test_network_watchers_begin_get_troubleshooting_result(self, resource_group): response = await ( await self.client.network_watchers.begin_get_troubleshooting_result( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -208,7 +208,7 @@ async def test_begin_get_troubleshooting_result(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_set_flow_log_configuration(self, resource_group): + async def test_network_watchers_begin_set_flow_log_configuration(self, resource_group): response = await ( await self.client.network_watchers.begin_set_flow_log_configuration( resource_group_name=resource_group.name, @@ -236,7 +236,7 @@ async def test_begin_set_flow_log_configuration(self, resource_group): }, "retentionPolicy": {"days": 0, "enabled": False}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -245,13 +245,13 @@ async def test_begin_set_flow_log_configuration(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_flow_log_status(self, resource_group): + async def test_network_watchers_begin_get_flow_log_status(self, resource_group): response = await ( await self.client.network_watchers.begin_get_flow_log_status( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"targetResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -260,7 +260,7 @@ async def test_begin_get_flow_log_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_check_connectivity(self, resource_group): + async def test_network_watchers_begin_check_connectivity(self, resource_group): response = await ( await self.client.network_watchers.begin_check_connectivity( resource_group_name=resource_group.name, @@ -278,7 +278,7 @@ async def test_begin_check_connectivity(self, resource_group): } }, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -287,7 +287,7 @@ async def test_begin_check_connectivity(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_azure_reachability_report(self, resource_group): + async def test_network_watchers_begin_get_azure_reachability_report(self, resource_group): response = await ( await self.client.network_watchers.begin_get_azure_reachability_report( resource_group_name=resource_group.name, @@ -299,7 +299,7 @@ async def test_begin_get_azure_reachability_report(self, resource_group): "azureLocations": ["str"], "providers": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -308,13 +308,13 @@ async def test_begin_get_azure_reachability_report(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_available_providers(self, resource_group): + async def test_network_watchers_begin_list_available_providers(self, resource_group): response = await ( await self.client.network_watchers.begin_list_available_providers( resource_group_name=resource_group.name, network_watcher_name="str", parameters={"azureLocations": ["str"], "city": "str", "country": "str", "state": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -323,7 +323,7 @@ async def test_begin_list_available_providers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_network_configuration_diagnostic(self, resource_group): + async def test_network_watchers_begin_get_network_configuration_diagnostic(self, resource_group): response = await ( await self.client.network_watchers.begin_get_network_configuration_diagnostic( resource_group_name=resource_group.name, @@ -341,7 +341,7 @@ async def test_begin_get_network_configuration_diagnostic(self, resource_group): "targetResourceId": "str", "verbosityLevel": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations.py index 54b88d1198ae..24658517c869 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations_async.py index 01efbfcd886f..7342d99689a9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations.py index 99ee379d45e8..1cac65f5585b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_p2_svpn_gateways_get(self, resource_group): response = self.client.p2_svpn_gateways.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_p2_svpn_gateways_begin_create_or_update(self, resource_group): response = self.client.p2_svpn_gateways.begin_create_or_update( resource_group_name=resource_group.name, gateway_name="str", @@ -80,7 +80,12 @@ def test_begin_create_or_update(self, resource_group): }, }, }, - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "provisioningState": "str", @@ -96,7 +101,7 @@ def test_begin_create_or_update(self, resource_group): "vpnGatewayScaleUnit": 0, "vpnServerConfiguration": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,12 +109,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_p2_svpn_gateways_begin_update_tags(self, resource_group): response = self.client.p2_svpn_gateways.begin_update_tags( resource_group_name=resource_group.name, gateway_name="str", p2_s_vpn_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -117,11 +122,11 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_p2_svpn_gateways_begin_delete(self, resource_group): response = self.client.p2_svpn_gateways.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -129,10 +134,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_p2_svpn_gateways_list_by_resource_group(self, resource_group): response = self.client.p2_svpn_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -140,9 +145,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_p2_svpn_gateways_list(self, resource_group): response = self.client.p2_svpn_gateways.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -150,11 +155,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset(self, resource_group): + def test_p2_svpn_gateways_begin_reset(self, resource_group): response = self.client.p2_svpn_gateways.begin_reset( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -162,12 +167,12 @@ def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_generate_vpn_profile(self, resource_group): + def test_p2_svpn_gateways_begin_generate_vpn_profile(self, resource_group): response = self.client.p2_svpn_gateways.begin_generate_vpn_profile( resource_group_name=resource_group.name, gateway_name="str", parameters={"authenticationMethod": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -175,11 +180,11 @@ def test_begin_generate_vpn_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_p2_s_vpn_connection_health(self, resource_group): + def test_p2_svpn_gateways_begin_get_p2_s_vpn_connection_health(self, resource_group): response = self.client.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -187,12 +192,12 @@ def test_begin_get_p2_s_vpn_connection_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_p2_s_vpn_connection_health_detailed(self, resource_group): + def test_p2_svpn_gateways_begin_get_p2_s_vpn_connection_health_detailed(self, resource_group): response = self.client.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health_detailed( resource_group_name=resource_group.name, gateway_name="str", request={"outputBlobSasUrl": "str", "vpnUserNamesFilter": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -200,12 +205,12 @@ def test_begin_get_p2_s_vpn_connection_health_detailed(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_disconnect_p2_s_vpn_connections(self, resource_group): + def test_p2_svpn_gateways_begin_disconnect_p2_s_vpn_connections(self, resource_group): response = self.client.p2_svpn_gateways.begin_disconnect_p2_s_vpn_connections( resource_group_name=resource_group.name, p2_s_vpn_gateway_name="str", request={"vpnConnectionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations_async.py index 32c1d403fc1a..59ead203a7f6 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_p2_svpn_gateways_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_p2_svpn_gateways_get(self, resource_group): response = await self.client.p2_svpn_gateways.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_p2_svpn_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -82,7 +82,12 @@ async def test_begin_create_or_update(self, resource_group): }, }, }, - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "provisioningState": "str", @@ -98,7 +103,7 @@ async def test_begin_create_or_update(self, resource_group): "vpnGatewayScaleUnit": 0, "vpnServerConfiguration": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -107,13 +112,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_p2_svpn_gateways_begin_update_tags(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_update_tags( resource_group_name=resource_group.name, gateway_name="str", p2_s_vpn_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -122,12 +127,12 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_p2_svpn_gateways_begin_delete(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -136,10 +141,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_p2_svpn_gateways_list_by_resource_group(self, resource_group): response = self.client.p2_svpn_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -147,9 +152,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_p2_svpn_gateways_list(self, resource_group): response = self.client.p2_svpn_gateways.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -157,12 +162,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset(self, resource_group): + async def test_p2_svpn_gateways_begin_reset(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_reset( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -171,13 +176,13 @@ async def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_generate_vpn_profile(self, resource_group): + async def test_p2_svpn_gateways_begin_generate_vpn_profile(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_generate_vpn_profile( resource_group_name=resource_group.name, gateway_name="str", parameters={"authenticationMethod": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -186,12 +191,12 @@ async def test_begin_generate_vpn_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_p2_s_vpn_connection_health(self, resource_group): + async def test_p2_svpn_gateways_begin_get_p2_s_vpn_connection_health(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -200,13 +205,13 @@ async def test_begin_get_p2_s_vpn_connection_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_p2_s_vpn_connection_health_detailed(self, resource_group): + async def test_p2_svpn_gateways_begin_get_p2_s_vpn_connection_health_detailed(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health_detailed( resource_group_name=resource_group.name, gateway_name="str", request={"outputBlobSasUrl": "str", "vpnUserNamesFilter": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -215,13 +220,13 @@ async def test_begin_get_p2_s_vpn_connection_health_detailed(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_disconnect_p2_s_vpn_connections(self, resource_group): + async def test_p2_svpn_gateways_begin_disconnect_p2_s_vpn_connections(self, resource_group): response = await ( await self.client.p2_svpn_gateways.begin_disconnect_p2_s_vpn_connections( resource_group_name=resource_group.name, p2_s_vpn_gateway_name="str", request={"vpnConnectionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations.py index 01ac8b752d71..4c2862d42ae9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create(self, resource_group): + def test_packet_captures_begin_create(self, resource_group): response = self.client.packet_captures.begin_create( resource_group_name=resource_group.name, network_watcher_name="str", @@ -45,7 +45,7 @@ def test_begin_create(self, resource_group): "timeLimitInSeconds": 18000, "totalBytesPerSession": 1073741824, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -53,12 +53,12 @@ def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_packet_captures_get(self, resource_group): response = self.client.packet_captures.get( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -66,12 +66,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_packet_captures_begin_delete(self, resource_group): response = self.client.packet_captures.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -79,12 +79,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop(self, resource_group): + def test_packet_captures_begin_stop(self, resource_group): response = self.client.packet_captures.begin_stop( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -92,12 +92,12 @@ def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_status(self, resource_group): + def test_packet_captures_begin_get_status(self, resource_group): response = self.client.packet_captures.begin_get_status( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -105,11 +105,11 @@ def test_begin_get_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_packet_captures_list(self, resource_group): response = self.client.packet_captures.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations_async.py index 3611c4900cae..9b0e78be768b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_packet_captures_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create(self, resource_group): + async def test_packet_captures_begin_create(self, resource_group): response = await ( await self.client.packet_captures.begin_create( resource_group_name=resource_group.name, @@ -56,7 +56,7 @@ async def test_begin_create(self, resource_group): "timeLimitInSeconds": 18000, "totalBytesPerSession": 1073741824, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -65,12 +65,12 @@ async def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_packet_captures_get(self, resource_group): response = await self.client.packet_captures.get( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -78,13 +78,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_packet_captures_begin_delete(self, resource_group): response = await ( await self.client.packet_captures.begin_delete( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -93,13 +93,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop(self, resource_group): + async def test_packet_captures_begin_stop(self, resource_group): response = await ( await self.client.packet_captures.begin_stop( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -108,13 +108,13 @@ async def test_begin_stop(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_status(self, resource_group): + async def test_packet_captures_begin_get_status(self, resource_group): response = await ( await self.client.packet_captures.begin_get_status( resource_group_name=resource_group.name, network_watcher_name="str", packet_capture_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -123,11 +123,11 @@ async def test_begin_get_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_packet_captures_list(self, resource_group): response = self.client.packet_captures.list( resource_group_name=resource_group.name, network_watcher_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations.py index dffbeb620bfc..2ac3f121e9d4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_peer_express_route_circuit_connections_get(self, resource_group): response = self.client.peer_express_route_circuit_connections.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,12 +34,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_peer_express_route_circuit_connections_list(self, resource_group): response = self.client.peer_express_route_circuit_connections.list( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations_async.py index fd922a300e0d..f33334ac848d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_peer_express_route_circuit_connections_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_peer_express_route_circuit_connections_get(self, resource_group): response = await self.client.peer_express_route_circuit_connections.get( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -35,12 +35,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_peer_express_route_circuit_connections_list(self, resource_group): response = self.client.peer_express_route_circuit_connections.list( resource_group_name=resource_group.name, circuit_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations.py index 0204d6da0246..1ac276f6fa51 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_private_dns_zone_groups_begin_delete(self, resource_group): response = self.client.private_dns_zone_groups.begin_delete( resource_group_name=resource_group.name, private_endpoint_name="str", private_dns_zone_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_private_dns_zone_groups_get(self, resource_group): response = self.client.private_dns_zone_groups.get( resource_group_name=resource_group.name, private_endpoint_name="str", private_dns_zone_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_private_dns_zone_groups_begin_create_or_update(self, resource_group): response = self.client.private_dns_zone_groups.begin_create_or_update( resource_group_name=resource_group.name, private_endpoint_name="str", @@ -73,7 +73,7 @@ def test_begin_create_or_update(self, resource_group): ], "provisioningState": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,11 +81,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_private_dns_zone_groups_list(self, resource_group): response = self.client.private_dns_zone_groups.list( private_endpoint_name="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations_async.py index 626d89896fbc..5a15e72f4dcc 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_dns_zone_groups_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_private_dns_zone_groups_begin_delete(self, resource_group): response = await ( await self.client.private_dns_zone_groups.begin_delete( resource_group_name=resource_group.name, private_endpoint_name="str", private_dns_zone_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_private_dns_zone_groups_get(self, resource_group): response = await self.client.private_dns_zone_groups.get( resource_group_name=resource_group.name, private_endpoint_name="str", private_dns_zone_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_private_dns_zone_groups_begin_create_or_update(self, resource_group): response = await ( await self.client.private_dns_zone_groups.begin_create_or_update( resource_group_name=resource_group.name, @@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group): ], "provisioningState": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -86,11 +86,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_private_dns_zone_groups_list(self, resource_group): response = self.client.private_dns_zone_groups.list( private_endpoint_name="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations.py index 7ce58b9fe162..f98172b0b325 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_private_endpoints_begin_delete(self, resource_group): response = self.client.private_endpoints.begin_delete( resource_group_name=resource_group.name, private_endpoint_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_private_endpoints_get(self, resource_group): response = self.client.private_endpoints.get( resource_group_name=resource_group.name, private_endpoint_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_private_endpoints_begin_create_or_update(self, resource_group): response = self.client.private_endpoints.begin_create_or_update( resource_group_name=resource_group.name, private_endpoint_name="str", @@ -99,6 +99,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -270,6 +271,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -637,6 +645,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -952,6 +963,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1323,6 +1341,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1823,6 +1848,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2044,6 +2072,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2357,6 +2392,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2725,6 +2767,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3077,6 +3126,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3445,6 +3501,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3845,6 +3908,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4212,6 +4282,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4583,6 +4660,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4674,6 +4754,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5508,7 +5589,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -5516,10 +5597,10 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_private_endpoints_list(self, resource_group): response = self.client.private_endpoints.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -5527,9 +5608,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_private_endpoints_list_by_subscription(self, resource_group): response = self.client.private_endpoints.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations_async.py index 5d7f29c8d23d..c9b4497b48ff 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_endpoints_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_private_endpoints_begin_delete(self, resource_group): response = await ( await self.client.private_endpoints.begin_delete( resource_group_name=resource_group.name, private_endpoint_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_private_endpoints_get(self, resource_group): response = await self.client.private_endpoints.get( resource_group_name=resource_group.name, private_endpoint_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_private_endpoints_begin_create_or_update(self, resource_group): response = await ( await self.client.private_endpoints.begin_create_or_update( resource_group_name=resource_group.name, @@ -103,6 +103,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -278,6 +279,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -645,6 +653,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -960,6 +975,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1334,6 +1356,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1836,6 +1865,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -2057,6 +2093,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2373,6 +2416,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2741,6 +2791,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3093,6 +3150,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3464,6 +3528,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3864,6 +3935,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4234,6 +4312,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4605,6 +4690,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -4696,6 +4784,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -5532,7 +5621,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -5541,10 +5630,10 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_private_endpoints_list(self, resource_group): response = self.client.private_endpoints.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -5552,9 +5641,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_private_endpoints_list_by_subscription(self, resource_group): response = self.client.private_endpoints.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations.py index f4d98588f4c5..735c81191c80 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_private_link_services_begin_delete(self, resource_group): response = self.client.private_link_services.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_private_link_services_get(self, resource_group): response = self.client.private_link_services.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_private_link_services_begin_create_or_update(self, resource_group): response = self.client.private_link_services.begin_create_or_update( resource_group_name=resource_group.name, service_name="str", @@ -163,6 +163,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -256,6 +259,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1001,6 +1005,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1905,6 +1910,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1998,6 +2006,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2481,6 +2490,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3173,6 +3183,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3266,6 +3279,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3859,6 +3873,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4543,6 +4558,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4714,6 +4730,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5152,6 +5175,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5538,6 +5564,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5982,6 +6015,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6553,6 +6593,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6891,6 +6934,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7218,6 +7264,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7659,6 +7712,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8130,6 +8190,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8570,6 +8637,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8955,6 +9029,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -9133,6 +9208,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9503,6 +9585,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9818,6 +9907,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10197,6 +10293,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10705,6 +10808,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -10897,6 +11007,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -11271,6 +11388,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -11681,6 +11805,13 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12054,6 +12185,13 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12431,6 +12569,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12524,6 +12665,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -13260,7 +13402,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "visibility": {"subscriptions": ["str"]}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -13268,10 +13410,10 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_private_link_services_list(self, resource_group): response = self.client.private_link_services.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -13279,9 +13421,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_private_link_services_list_by_subscription(self, resource_group): response = self.client.private_link_services.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -13289,12 +13431,12 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_private_endpoint_connection(self, resource_group): + def test_private_link_services_get_private_endpoint_connection(self, resource_group): response = self.client.private_link_services.get_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", pe_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -13302,7 +13444,7 @@ def test_get_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_private_endpoint_connection(self, resource_group): + def test_private_link_services_update_private_endpoint_connection(self, resource_group): response = self.client.private_link_services.update_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", @@ -13363,6 +13505,7 @@ def test_update_private_endpoint_connection(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -13538,6 +13681,13 @@ def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -13905,6 +14055,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -14220,6 +14377,13 @@ def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -14594,6 +14758,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -15096,6 +15267,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -15317,6 +15495,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -15633,6 +15818,13 @@ def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16001,6 +16193,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16337,6 +16536,13 @@ def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16708,6 +16914,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17108,6 +17321,13 @@ def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17478,6 +17698,13 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17849,6 +18076,9 @@ def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17940,6 +18170,7 @@ def test_update_private_endpoint_connection(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -18765,7 +18996,7 @@ def test_update_private_endpoint_connection(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -18773,12 +19004,12 @@ def test_update_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete_private_endpoint_connection(self, resource_group): + def test_private_link_services_begin_delete_private_endpoint_connection(self, resource_group): response = self.client.private_link_services.begin_delete_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", pe_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -18786,11 +19017,11 @@ def test_begin_delete_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_private_endpoint_connections(self, resource_group): + def test_private_link_services_list_private_endpoint_connections(self, resource_group): response = self.client.private_link_services.list_private_endpoint_connections( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -18798,11 +19029,11 @@ def test_list_private_endpoint_connections(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_check_private_link_service_visibility(self, resource_group): + def test_private_link_services_begin_check_private_link_service_visibility(self, resource_group): response = self.client.private_link_services.begin_check_private_link_service_visibility( location="str", parameters={"privateLinkServiceAlias": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -18810,12 +19041,12 @@ def test_begin_check_private_link_service_visibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_check_private_link_service_visibility_by_resource_group(self, resource_group): + def test_private_link_services_begin_check_private_link_service_visibility_by_resource_group(self, resource_group): response = self.client.private_link_services.begin_check_private_link_service_visibility_by_resource_group( location="str", resource_group_name=resource_group.name, parameters={"privateLinkServiceAlias": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -18823,10 +19054,10 @@ def test_begin_check_private_link_service_visibility_by_resource_group(self, res @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_auto_approved_private_link_services(self, resource_group): + def test_private_link_services_list_auto_approved_private_link_services(self, resource_group): response = self.client.private_link_services.list_auto_approved_private_link_services( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -18834,11 +19065,11 @@ def test_list_auto_approved_private_link_services(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_auto_approved_private_link_services_by_resource_group(self, resource_group): + def test_private_link_services_list_auto_approved_private_link_services_by_resource_group(self, resource_group): response = self.client.private_link_services.list_auto_approved_private_link_services_by_resource_group( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations_async.py index 7ca934908074..afd61d1d908a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_private_link_services_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_private_link_services_begin_delete(self, resource_group): response = await ( await self.client.private_link_services.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_private_link_services_get(self, resource_group): response = await self.client.private_link_services.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_private_link_services_begin_create_or_update(self, resource_group): response = await ( await self.client.private_link_services.begin_create_or_update( resource_group_name=resource_group.name, @@ -170,6 +170,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -263,6 +266,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1010,6 +1014,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1921,6 +1926,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2014,6 +2026,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2497,6 +2510,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3197,6 +3211,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3290,6 +3307,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3885,6 +3903,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4573,6 +4592,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4748,6 +4768,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5186,6 +5213,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5572,6 +5606,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6019,6 +6060,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6594,6 +6642,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6932,6 +6987,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7259,6 +7317,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7703,6 +7768,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8174,6 +8246,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8617,6 +8696,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9002,6 +9088,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -9185,6 +9272,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9558,6 +9652,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9873,6 +9974,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10261,6 +10369,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -10769,6 +10884,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -10961,6 +11083,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -11340,6 +11469,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -11757,6 +11893,13 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12135,6 +12278,13 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12515,6 +12665,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -12608,6 +12761,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -13351,7 +13505,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "visibility": {"subscriptions": ["str"]}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -13360,10 +13514,10 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_private_link_services_list(self, resource_group): response = self.client.private_link_services.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -13371,9 +13525,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_private_link_services_list_by_subscription(self, resource_group): response = self.client.private_link_services.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -13381,12 +13535,12 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_private_endpoint_connection(self, resource_group): + async def test_private_link_services_get_private_endpoint_connection(self, resource_group): response = await self.client.private_link_services.get_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", pe_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -13394,7 +13548,7 @@ async def test_get_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_private_endpoint_connection(self, resource_group): + async def test_private_link_services_update_private_endpoint_connection(self, resource_group): response = await self.client.private_link_services.update_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", @@ -13455,6 +13609,7 @@ async def test_update_private_endpoint_connection(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -13630,6 +13785,13 @@ async def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -13997,6 +14159,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -14312,6 +14481,13 @@ async def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -14686,6 +14862,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -15188,6 +15371,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -15409,6 +15599,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -15725,6 +15922,13 @@ async def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16093,6 +16297,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16429,6 +16640,13 @@ async def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -16800,6 +17018,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17200,6 +17425,13 @@ async def test_update_private_endpoint_connection(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17570,6 +17802,13 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -17941,6 +18180,9 @@ async def test_update_private_endpoint_connection(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -18032,6 +18274,7 @@ async def test_update_private_endpoint_connection(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -18857,7 +19100,7 @@ async def test_update_private_endpoint_connection(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -18865,13 +19108,13 @@ async def test_update_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete_private_endpoint_connection(self, resource_group): + async def test_private_link_services_begin_delete_private_endpoint_connection(self, resource_group): response = await ( await self.client.private_link_services.begin_delete_private_endpoint_connection( resource_group_name=resource_group.name, service_name="str", pe_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -18880,11 +19123,11 @@ async def test_begin_delete_private_endpoint_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_private_endpoint_connections(self, resource_group): + async def test_private_link_services_list_private_endpoint_connections(self, resource_group): response = self.client.private_link_services.list_private_endpoint_connections( resource_group_name=resource_group.name, service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -18892,12 +19135,12 @@ async def test_list_private_endpoint_connections(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_check_private_link_service_visibility(self, resource_group): + async def test_private_link_services_begin_check_private_link_service_visibility(self, resource_group): response = await ( await self.client.private_link_services.begin_check_private_link_service_visibility( location="str", parameters={"privateLinkServiceAlias": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -18906,13 +19149,15 @@ async def test_begin_check_private_link_service_visibility(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_check_private_link_service_visibility_by_resource_group(self, resource_group): + async def test_private_link_services_begin_check_private_link_service_visibility_by_resource_group( + self, resource_group + ): response = await ( await self.client.private_link_services.begin_check_private_link_service_visibility_by_resource_group( location="str", resource_group_name=resource_group.name, parameters={"privateLinkServiceAlias": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -18921,10 +19166,10 @@ async def test_begin_check_private_link_service_visibility_by_resource_group(sel @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_auto_approved_private_link_services(self, resource_group): + async def test_private_link_services_list_auto_approved_private_link_services(self, resource_group): response = self.client.private_link_services.list_auto_approved_private_link_services( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -18932,11 +19177,13 @@ async def test_list_auto_approved_private_link_services(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_auto_approved_private_link_services_by_resource_group(self, resource_group): + async def test_private_link_services_list_auto_approved_private_link_services_by_resource_group( + self, resource_group + ): response = self.client.private_link_services.list_auto_approved_private_link_services_by_resource_group( location="str", resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations.py index 4ea551951eb8..7f5a0c6e82ee 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_cloud_service_public_ip_addresses(self, resource_group): + def test_public_ip_addresses_list_cloud_service_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_cloud_service_public_ip_addresses( resource_group_name=resource_group.name, cloud_service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,14 +32,14 @@ def test_list_cloud_service_public_ip_addresses(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_cloud_service_role_instance_public_ip_addresses(self, resource_group): + def test_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_cloud_service_role_instance_public_ip_addresses( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", network_interface_name="str", ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -47,7 +47,7 @@ def test_list_cloud_service_role_instance_public_ip_addresses(self, resource_gro @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_cloud_service_public_ip_address(self, resource_group): + def test_public_ip_addresses_get_cloud_service_public_ip_address(self, resource_group): response = self.client.public_ip_addresses.get_cloud_service_public_ip_address( resource_group_name=resource_group.name, cloud_service_name="str", @@ -55,7 +55,7 @@ def test_get_cloud_service_public_ip_address(self, resource_group): network_interface_name="str", ip_configuration_name="str", public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -63,11 +63,11 @@ def test_get_cloud_service_public_ip_address(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_public_ip_addresses_begin_delete(self, resource_group): response = self.client.public_ip_addresses.begin_delete( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -75,11 +75,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_public_ip_addresses_get(self, resource_group): response = self.client.public_ip_addresses.get( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -87,7 +87,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_public_ip_addresses_begin_create_or_update(self, resource_group): response = self.client.public_ip_addresses.begin_create_or_update( resource_group_name=resource_group.name, public_ip_address_name="str", @@ -152,6 +152,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -243,6 +246,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -884,6 +888,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1577,7 +1582,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -1585,12 +1590,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_public_ip_addresses_update_tags(self, resource_group): response = self.client.public_ip_addresses.update_tags( resource_group_name=resource_group.name, public_ip_address_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -1598,9 +1603,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_public_ip_addresses_list_all(self, resource_group): response = self.client.public_ip_addresses.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -1608,10 +1613,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_public_ip_addresses_list(self, resource_group): response = self.client.public_ip_addresses.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -1619,11 +1624,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_ddos_protection_status(self, resource_group): + def test_public_ip_addresses_begin_ddos_protection_status(self, resource_group): response = self.client.public_ip_addresses.begin_ddos_protection_status( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -1631,7 +1636,7 @@ def test_begin_ddos_protection_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_virtual_machine_scale_set_public_ip_addresses(self, resource_group): + def test_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_virtual_machine_scale_set_public_ip_addresses( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -1643,7 +1648,7 @@ def test_list_virtual_machine_scale_set_public_ip_addresses(self, resource_group @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resource_group): + def test_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_virtual_machine_scale_set_vm_public_ip_addresses( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -1658,7 +1663,7 @@ def test_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resource_gr @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_virtual_machine_scale_set_public_ip_address(self, resource_group): + def test_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address(self, resource_group): response = self.client.public_ip_addresses.get_virtual_machine_scale_set_public_ip_address( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations_async.py index 2d0f316f33c1..2f694ac1aeda 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_addresses_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_cloud_service_public_ip_addresses(self, resource_group): + async def test_public_ip_addresses_list_cloud_service_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_cloud_service_public_ip_addresses( resource_group_name=resource_group.name, cloud_service_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,14 +33,14 @@ async def test_list_cloud_service_public_ip_addresses(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_cloud_service_role_instance_public_ip_addresses(self, resource_group): + async def test_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_cloud_service_role_instance_public_ip_addresses( resource_group_name=resource_group.name, cloud_service_name="str", role_instance_name="str", network_interface_name="str", ip_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -48,7 +48,7 @@ async def test_list_cloud_service_role_instance_public_ip_addresses(self, resour @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_cloud_service_public_ip_address(self, resource_group): + async def test_public_ip_addresses_get_cloud_service_public_ip_address(self, resource_group): response = await self.client.public_ip_addresses.get_cloud_service_public_ip_address( resource_group_name=resource_group.name, cloud_service_name="str", @@ -56,7 +56,7 @@ async def test_get_cloud_service_public_ip_address(self, resource_group): network_interface_name="str", ip_configuration_name="str", public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -64,12 +64,12 @@ async def test_get_cloud_service_public_ip_address(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_public_ip_addresses_begin_delete(self, resource_group): response = await ( await self.client.public_ip_addresses.begin_delete( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -78,11 +78,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_public_ip_addresses_get(self, resource_group): response = await self.client.public_ip_addresses.get( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -90,7 +90,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_public_ip_addresses_begin_create_or_update(self, resource_group): response = await ( await self.client.public_ip_addresses.begin_create_or_update( resource_group_name=resource_group.name, @@ -156,6 +156,9 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -249,6 +252,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -899,6 +903,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1594,7 +1599,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -1603,12 +1608,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_public_ip_addresses_update_tags(self, resource_group): response = await self.client.public_ip_addresses.update_tags( resource_group_name=resource_group.name, public_ip_address_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -1616,9 +1621,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_public_ip_addresses_list_all(self, resource_group): response = self.client.public_ip_addresses.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -1626,10 +1631,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_public_ip_addresses_list(self, resource_group): response = self.client.public_ip_addresses.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -1637,12 +1642,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_ddos_protection_status(self, resource_group): + async def test_public_ip_addresses_begin_ddos_protection_status(self, resource_group): response = await ( await self.client.public_ip_addresses.begin_ddos_protection_status( resource_group_name=resource_group.name, public_ip_address_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -1651,7 +1656,7 @@ async def test_begin_ddos_protection_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_virtual_machine_scale_set_public_ip_addresses(self, resource_group): + async def test_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_virtual_machine_scale_set_public_ip_addresses( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -1663,7 +1668,7 @@ async def test_list_virtual_machine_scale_set_public_ip_addresses(self, resource @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resource_group): + async def test_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resource_group): response = self.client.public_ip_addresses.list_virtual_machine_scale_set_vm_public_ip_addresses( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -1678,7 +1683,7 @@ async def test_list_virtual_machine_scale_set_vm_public_ip_addresses(self, resou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_virtual_machine_scale_set_public_ip_address(self, resource_group): + async def test_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address(self, resource_group): response = await self.client.public_ip_addresses.get_virtual_machine_scale_set_public_ip_address( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations.py index 6c07394ebe77..c7a3df9f1f6c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_public_ip_prefixes_begin_delete(self, resource_group): response = self.client.public_ip_prefixes.begin_delete( resource_group_name=resource_group.name, public_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_public_ip_prefixes_get(self, resource_group): response = self.client.public_ip_prefixes.get( resource_group_name=resource_group.name, public_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_public_ip_prefixes_begin_create_or_update(self, resource_group): response = self.client.public_ip_prefixes.begin_create_or_update( resource_group_name=resource_group.name, public_ip_prefix_name="str", @@ -84,7 +84,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -92,12 +92,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_public_ip_prefixes_update_tags(self, resource_group): response = self.client.public_ip_prefixes.update_tags( resource_group_name=resource_group.name, public_ip_prefix_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -105,9 +105,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_public_ip_prefixes_list_all(self, resource_group): response = self.client.public_ip_prefixes.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -115,10 +115,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_public_ip_prefixes_list(self, resource_group): response = self.client.public_ip_prefixes.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations_async.py index 07188325c46e..0c5f59984ca2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_public_ip_prefixes_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_public_ip_prefixes_begin_delete(self, resource_group): response = await ( await self.client.public_ip_prefixes.begin_delete( resource_group_name=resource_group.name, public_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_public_ip_prefixes_get(self, resource_group): response = await self.client.public_ip_prefixes.get( resource_group_name=resource_group.name, public_ip_prefix_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_public_ip_prefixes_begin_create_or_update(self, resource_group): response = await ( await self.client.public_ip_prefixes.begin_create_or_update( resource_group_name=resource_group.name, @@ -88,7 +88,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -97,12 +97,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_public_ip_prefixes_update_tags(self, resource_group): response = await self.client.public_ip_prefixes.update_tags( resource_group_name=resource_group.name, public_ip_prefix_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -110,9 +110,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_public_ip_prefixes_list_all(self, resource_group): response = self.client.public_ip_prefixes.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -120,10 +120,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_public_ip_prefixes_list(self, resource_group): response = self.client.public_ip_prefixes.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations.py new file mode 100644 index 000000000000..d0a4f9b71263 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementReachabilityAnalysisIntentsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_intents_list(self, resource_group): + response = self.client.reachability_analysis_intents.list( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_intents_get(self, resource_group): + response = self.client.reachability_analysis_intents.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_intents_create(self, resource_group): + response = self.client.reachability_analysis_intents.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + body={ + "properties": { + "destinationResourceId": "str", + "ipTraffic": { + "destinationIps": ["str"], + "destinationPorts": ["str"], + "protocols": ["str"], + "sourceIps": ["str"], + "sourcePorts": ["str"], + }, + "sourceResourceId": "str", + "description": "str", + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_intents_delete(self, resource_group): + response = self.client.reachability_analysis_intents.delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations_async.py new file mode 100644 index 000000000000..20d20880cf9c --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_intents_operations_async.py @@ -0,0 +1,101 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementReachabilityAnalysisIntentsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_intents_list(self, resource_group): + response = self.client.reachability_analysis_intents.list( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_intents_get(self, resource_group): + response = await self.client.reachability_analysis_intents.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_intents_create(self, resource_group): + response = await self.client.reachability_analysis_intents.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + body={ + "properties": { + "destinationResourceId": "str", + "ipTraffic": { + "destinationIps": ["str"], + "destinationPorts": ["str"], + "protocols": ["str"], + "sourceIps": ["str"], + "sourcePorts": ["str"], + }, + "sourceResourceId": "str", + "description": "str", + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_intents_delete(self, resource_group): + response = await self.client.reachability_analysis_intents.delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_intent_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations.py new file mode 100644 index 000000000000..7a2ca6c12a43 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations.py @@ -0,0 +1,106 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementReachabilityAnalysisRunsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_runs_list(self, resource_group): + response = self.client.reachability_analysis_runs.list( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_runs_get(self, resource_group): + response = self.client.reachability_analysis_runs.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_runs_create(self, resource_group): + response = self.client.reachability_analysis_runs.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + body={ + "properties": { + "intentId": "str", + "analysisResult": "str", + "description": "str", + "errorMessage": "str", + "intentContent": { + "destinationResourceId": "str", + "ipTraffic": { + "destinationIps": ["str"], + "destinationPorts": ["str"], + "protocols": ["str"], + "sourceIps": ["str"], + "sourcePorts": ["str"], + }, + "sourceResourceId": "str", + "description": "str", + }, + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_reachability_analysis_runs_begin_delete(self, resource_group): + response = self.client.reachability_analysis_runs.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations_async.py new file mode 100644 index 000000000000..f2720f86d567 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_reachability_analysis_runs_operations_async.py @@ -0,0 +1,109 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementReachabilityAnalysisRunsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_runs_list(self, resource_group): + response = self.client.reachability_analysis_runs.list( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_runs_get(self, resource_group): + response = await self.client.reachability_analysis_runs.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_runs_create(self, resource_group): + response = await self.client.reachability_analysis_runs.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + body={ + "properties": { + "intentId": "str", + "analysisResult": "str", + "description": "str", + "errorMessage": "str", + "intentContent": { + "destinationResourceId": "str", + "ipTraffic": { + "destinationIps": ["str"], + "destinationPorts": ["str"], + "protocols": ["str"], + "sourceIps": ["str"], + "sourcePorts": ["str"], + }, + "sourceResourceId": "str", + "description": "str", + }, + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_reachability_analysis_runs_begin_delete(self, resource_group): + response = await ( + await self.client.reachability_analysis_runs.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + reachability_analysis_run_name="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations.py index 43d819f65375..22bbb198e93c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_resource_navigation_links_list(self, resource_group): response = self.client.resource_navigation_links.list( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations_async.py index 79879d797d5b..f251890e39a9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_resource_navigation_links_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_resource_navigation_links_list(self, resource_group): response = await self.client.resource_navigation_links.list( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations.py index a894d5687dca..f1087abf30fa 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_route_filter_rules_begin_delete(self, resource_group): response = self.client.route_filter_rules.begin_delete( resource_group_name=resource_group.name, route_filter_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_route_filter_rules_get(self, resource_group): response = self.client.route_filter_rules.get( resource_group_name=resource_group.name, route_filter_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_route_filter_rules_begin_create_or_update(self, resource_group): response = self.client.route_filter_rules.begin_create_or_update( resource_group_name=resource_group.name, route_filter_name="str", @@ -61,7 +61,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "routeFilterRuleType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_route_filter(self, resource_group): + def test_route_filter_rules_list_by_route_filter(self, resource_group): response = self.client.route_filter_rules.list_by_route_filter( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations_async.py index 0a0506ccc434..eeb60974e8a2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filter_rules_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_route_filter_rules_begin_delete(self, resource_group): response = await ( await self.client.route_filter_rules.begin_delete( resource_group_name=resource_group.name, route_filter_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_route_filter_rules_get(self, resource_group): response = await self.client.route_filter_rules.get( resource_group_name=resource_group.name, route_filter_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_route_filter_rules_begin_create_or_update(self, resource_group): response = await ( await self.client.route_filter_rules.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "routeFilterRuleType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_route_filter(self, resource_group): + async def test_route_filter_rules_list_by_route_filter(self, resource_group): response = self.client.route_filter_rules.list_by_route_filter( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations.py index 10cc78e36eec..3df8fb08cd44 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_route_filters_begin_delete(self, resource_group): response = self.client.route_filters.begin_delete( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_route_filters_get(self, resource_group): response = self.client.route_filters.get( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_route_filters_begin_create_or_update(self, resource_group): response = self.client.route_filters.begin_create_or_update( resource_group_name=resource_group.name, route_filter_name="str", @@ -237,7 +237,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -245,12 +245,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_route_filters_update_tags(self, resource_group): response = self.client.route_filters.update_tags( resource_group_name=resource_group.name, route_filter_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -258,10 +258,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_route_filters_list_by_resource_group(self, resource_group): response = self.client.route_filters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -269,9 +269,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_route_filters_list(self, resource_group): response = self.client.route_filters.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations_async.py index ade7f88c1bf5..bec0c5c25e08 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_filters_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_route_filters_begin_delete(self, resource_group): response = await ( await self.client.route_filters.begin_delete( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_route_filters_get(self, resource_group): response = await self.client.route_filters.get( resource_group_name=resource_group.name, route_filter_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_route_filters_begin_create_or_update(self, resource_group): response = await ( await self.client.route_filters.begin_create_or_update( resource_group_name=resource_group.name, @@ -241,7 +241,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -250,12 +250,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_route_filters_update_tags(self, resource_group): response = await self.client.route_filters.update_tags( resource_group_name=resource_group.name, route_filter_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -263,10 +263,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_route_filters_list_by_resource_group(self, resource_group): response = self.client.route_filters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -274,9 +274,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_route_filters_list(self, resource_group): response = self.client.route_filters.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations.py index adf790b4a80f..e9de25715a0b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_route_maps_get(self, resource_group): response = self.client.route_maps.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_map_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_route_maps_begin_create_or_update(self, resource_group): response = self.client.route_maps.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -62,7 +62,7 @@ def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -70,12 +70,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_route_maps_begin_delete(self, resource_group): response = self.client.route_maps.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_map_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -83,11 +83,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_route_maps_list(self, resource_group): response = self.client.route_maps.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations_async.py index a23b1b59eb9e..172da6bad787 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_maps_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_route_maps_get(self, resource_group): response = await self.client.route_maps.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_map_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_route_maps_begin_create_or_update(self, resource_group): response = await ( await self.client.route_maps.begin_create_or_update( resource_group_name=resource_group.name, @@ -69,7 +69,7 @@ async def test_begin_create_or_update(self, resource_group): ], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -78,13 +78,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_route_maps_begin_delete(self, resource_group): response = await ( await self.client.route_maps.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_map_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -93,11 +93,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_route_maps_list(self, resource_group): response = self.client.route_maps.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations.py index a41adebc7ba8..5c75b129c83c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_route_tables_begin_delete(self, resource_group): response = self.client.route_tables.begin_delete( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_route_tables_get(self, resource_group): response = self.client.route_tables.get( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_route_tables_begin_create_or_update(self, resource_group): response = self.client.route_tables.begin_create_or_update( resource_group_name=resource_group.name, route_table_name="str", @@ -166,6 +166,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -257,6 +260,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1188,6 +1192,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2118,7 +2123,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2126,12 +2131,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_route_tables_update_tags(self, resource_group): response = self.client.route_tables.update_tags( resource_group_name=resource_group.name, route_table_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2139,10 +2144,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_route_tables_list(self, resource_group): response = self.client.route_tables.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -2150,9 +2155,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_route_tables_list_all(self, resource_group): response = self.client.route_tables.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations_async.py index 15b6145bc39f..1d315e4728f5 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_route_tables_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_route_tables_begin_delete(self, resource_group): response = await ( await self.client.route_tables.begin_delete( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_route_tables_get(self, resource_group): response = await self.client.route_tables.get( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_route_tables_begin_create_or_update(self, resource_group): response = await ( await self.client.route_tables.begin_create_or_update( resource_group_name=resource_group.name, @@ -170,6 +170,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -263,6 +266,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1203,6 +1207,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2135,7 +2140,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2144,12 +2149,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_route_tables_update_tags(self, resource_group): response = await self.client.route_tables.update_tags( resource_group_name=resource_group.name, route_table_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2157,10 +2162,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_route_tables_list(self, resource_group): response = self.client.route_tables.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -2168,9 +2173,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_route_tables_list_all(self, resource_group): response = self.client.route_tables.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations.py index e246a1f0ad77..4c1962692cda 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_routes_begin_delete(self, resource_group): response = self.client.routes.begin_delete( resource_group_name=resource_group.name, route_table_name="str", route_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_routes_get(self, resource_group): response = self.client.routes.get( resource_group_name=resource_group.name, route_table_name="str", route_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_routes_begin_create_or_update(self, resource_group): response = self.client.routes.begin_create_or_update( resource_group_name=resource_group.name, route_table_name="str", @@ -62,7 +62,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -70,11 +70,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_routes_list(self, resource_group): response = self.client.routes.list( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations_async.py index 9bb8afa486e8..082eec589606 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routes_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_routes_begin_delete(self, resource_group): response = await ( await self.client.routes.begin_delete( resource_group_name=resource_group.name, route_table_name="str", route_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_routes_get(self, resource_group): response = await self.client.routes.get( resource_group_name=resource_group.name, route_table_name="str", route_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_routes_begin_create_or_update(self, resource_group): response = await ( await self.client.routes.begin_create_or_update( resource_group_name=resource_group.name, @@ -66,7 +66,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -75,11 +75,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_routes_list(self, resource_group): response = self.client.routes.list( resource_group_name=resource_group.name, route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations.py index 273846568e0d..43f3764d9711 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_routing_intent_begin_create_or_update(self, resource_group): response = self.client.routing_intent.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -33,7 +33,7 @@ def test_begin_create_or_update(self, resource_group): "routingPolicies": [{"destinations": ["str"], "name": "str", "nextHop": "str"}], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -41,12 +41,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_routing_intent_get(self, resource_group): response = self.client.routing_intent.get( resource_group_name=resource_group.name, virtual_hub_name="str", routing_intent_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -54,12 +54,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_routing_intent_begin_delete(self, resource_group): response = self.client.routing_intent.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", routing_intent_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -67,11 +67,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_routing_intent_list(self, resource_group): response = self.client.routing_intent.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations_async.py index d5df61a8b3d9..25bbf0b693b7 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_intent_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_routing_intent_begin_create_or_update(self, resource_group): response = await ( await self.client.routing_intent.begin_create_or_update( resource_group_name=resource_group.name, @@ -35,7 +35,7 @@ async def test_begin_create_or_update(self, resource_group): "routingPolicies": [{"destinations": ["str"], "name": "str", "nextHop": "str"}], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -44,12 +44,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_routing_intent_get(self, resource_group): response = await self.client.routing_intent.get( resource_group_name=resource_group.name, virtual_hub_name="str", routing_intent_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -57,13 +57,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_routing_intent_begin_delete(self, resource_group): response = await ( await self.client.routing_intent.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", routing_intent_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -72,11 +72,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_routing_intent_list(self, resource_group): response = self.client.routing_intent.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations.py index 8f6ead5337e8..d64f6325c61e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_routing_rule_collections_list(self, resource_group): response = self.client.routing_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_routing_rule_collections_get(self, resource_group): response = self.client.routing_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_routing_rule_collections_create_or_update(self, resource_group): response = self.client.routing_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -72,7 +72,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -80,13 +80,13 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_routing_rule_collections_begin_delete(self, resource_group): response = self.client.routing_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations_async.py index 91b7e3f0124e..5d0cad1e5372 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rule_collections_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_routing_rule_collections_list(self, resource_group): response = self.client.routing_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,13 +34,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_routing_rule_collections_get(self, resource_group): response = await self.client.routing_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -48,7 +48,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_routing_rule_collections_create_or_update(self, resource_group): response = await self.client.routing_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -73,7 +73,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,14 +81,14 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_routing_rule_collections_begin_delete(self, resource_group): response = await ( await self.client.routing_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations.py index f45f1173a4d4..6626d8316f42 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_routing_rules_list(self, resource_group): response = self.client.routing_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,14 +34,14 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_routing_rules_get(self, resource_group): response = self.client.routing_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_routing_rules_create_or_update(self, resource_group): response = self.client.routing_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -75,7 +75,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -83,14 +83,14 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_routing_rules_begin_delete(self, resource_group): response = self.client.routing_rules.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations_async.py index 13c73e0d4437..aa2f51137940 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_routing_rules_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_routing_rules_list(self, resource_group): response = self.client.routing_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,14 +35,14 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_routing_rules_get(self, resource_group): response = await self.client.routing_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_routing_rules_create_or_update(self, resource_group): response = await self.client.routing_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -76,7 +76,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_routing_rules_begin_delete(self, resource_group): response = await ( await self.client.routing_rules.begin_delete( resource_group_name=resource_group.name, @@ -92,7 +92,7 @@ async def test_begin_delete(self, resource_group): configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations.py index 2f787a1a0b6f..c67e6e9a8f0e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_scope_connections_create_or_update(self, resource_group): response = self.client.scope_connections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -43,7 +43,7 @@ def test_create_or_update(self, resource_group): "tenantId": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -51,12 +51,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_scope_connections_get(self, resource_group): response = self.client.scope_connections.get( resource_group_name=resource_group.name, network_manager_name="str", scope_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -64,12 +64,12 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_scope_connections_delete(self, resource_group): response = self.client.scope_connections.delete( resource_group_name=resource_group.name, network_manager_name="str", scope_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -77,11 +77,11 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_scope_connections_list(self, resource_group): response = self.client.scope_connections.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations_async.py index 7defea07fc77..cec4c066c26f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_scope_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_scope_connections_create_or_update(self, resource_group): response = await self.client.scope_connections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -44,7 +44,7 @@ async def test_create_or_update(self, resource_group): "tenantId": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -52,12 +52,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_scope_connections_get(self, resource_group): response = await self.client.scope_connections.get( resource_group_name=resource_group.name, network_manager_name="str", scope_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -65,12 +65,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_scope_connections_delete(self, resource_group): response = await self.client.scope_connections.delete( resource_group_name=resource_group.name, network_manager_name="str", scope_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -78,11 +78,11 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_scope_connections_list(self, resource_group): response = self.client.scope_connections.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations.py index ded53d6f4c97..488b418585ae 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_admin_configurations_list(self, resource_group): response = self.client.security_admin_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_admin_configurations_get(self, resource_group): response = self.client.security_admin_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_security_admin_configurations_create_or_update(self, resource_group): response = self.client.security_admin_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -56,6 +56,7 @@ def test_create_or_update(self, resource_group): "etag": "str", "id": "str", "name": "str", + "networkGroupAddressSpaceAggregationOption": "str", "provisioningState": "str", "resourceGuid": "str", "systemData": { @@ -68,7 +69,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -76,12 +77,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_admin_configurations_begin_delete(self, resource_group): response = self.client.security_admin_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations_async.py index e7f338e2cdec..e88665e47e41 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_admin_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_admin_configurations_list(self, resource_group): response = self.client.security_admin_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_admin_configurations_get(self, resource_group): response = await self.client.security_admin_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_security_admin_configurations_create_or_update(self, resource_group): response = await self.client.security_admin_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -57,6 +57,7 @@ async def test_create_or_update(self, resource_group): "etag": "str", "id": "str", "name": "str", + "networkGroupAddressSpaceAggregationOption": "str", "provisioningState": "str", "resourceGuid": "str", "systemData": { @@ -69,7 +70,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -77,13 +78,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_admin_configurations_begin_delete(self, resource_group): response = await ( await self.client.security_admin_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations.py index 133caf9e2d7c..6b8db1aa651e 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_partner_providers_begin_delete(self, resource_group): response = self.client.security_partner_providers.begin_delete( resource_group_name=resource_group.name, security_partner_provider_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_partner_providers_get(self, resource_group): response = self.client.security_partner_providers.get( resource_group_name=resource_group.name, security_partner_provider_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_security_partner_providers_begin_create_or_update(self, resource_group): response = self.client.security_partner_providers.begin_create_or_update( resource_group_name=resource_group.name, security_partner_provider_name="str", @@ -60,7 +60,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -68,12 +68,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_security_partner_providers_update_tags(self, resource_group): response = self.client.security_partner_providers.update_tags( resource_group_name=resource_group.name, security_partner_provider_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -81,10 +81,10 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_security_partner_providers_list_by_resource_group(self, resource_group): response = self.client.security_partner_providers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -92,9 +92,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_partner_providers_list(self, resource_group): response = self.client.security_partner_providers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations_async.py index bb9734a3ce0d..450b3edad14d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_partner_providers_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_partner_providers_begin_delete(self, resource_group): response = await ( await self.client.security_partner_providers.begin_delete( resource_group_name=resource_group.name, security_partner_provider_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_partner_providers_get(self, resource_group): response = await self.client.security_partner_providers.get( resource_group_name=resource_group.name, security_partner_provider_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_security_partner_providers_begin_create_or_update(self, resource_group): response = await ( await self.client.security_partner_providers.begin_create_or_update( resource_group_name=resource_group.name, @@ -64,7 +64,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "virtualHub": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -73,12 +73,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_security_partner_providers_update_tags(self, resource_group): response = await self.client.security_partner_providers.update_tags( resource_group_name=resource_group.name, security_partner_provider_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -86,10 +86,10 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_security_partner_providers_list_by_resource_group(self, resource_group): response = self.client.security_partner_providers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -97,9 +97,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_partner_providers_list(self, resource_group): response = self.client.security_partner_providers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations.py index 1724420c5329..6a899a50c6ec 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_rules_begin_delete(self, resource_group): response = self.client.security_rules.begin_delete( resource_group_name=resource_group.name, network_security_group_name="str", security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_rules_get(self, resource_group): response = self.client.security_rules.get( resource_group_name=resource_group.name, network_security_group_name="str", security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_security_rules_begin_create_or_update(self, resource_group): response = self.client.security_rules.begin_create_or_update( resource_group_name=resource_group.name, network_security_group_name="str", @@ -95,7 +95,7 @@ def test_begin_create_or_update(self, resource_group): "sourcePortRanges": ["str"], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -103,11 +103,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_rules_list(self, resource_group): response = self.client.security_rules.list( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations_async.py index 5053b13b7642..9f4ffb160c89 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_rules_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_rules_begin_delete(self, resource_group): response = await ( await self.client.security_rules.begin_delete( resource_group_name=resource_group.name, network_security_group_name="str", security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_rules_get(self, resource_group): response = await self.client.security_rules.get( resource_group_name=resource_group.name, network_security_group_name="str", security_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_security_rules_begin_create_or_update(self, resource_group): response = await ( await self.client.security_rules.begin_create_or_update( resource_group_name=resource_group.name, @@ -99,7 +99,7 @@ async def test_begin_create_or_update(self, resource_group): "sourcePortRanges": ["str"], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -108,11 +108,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_rules_list(self, resource_group): response = self.client.security_rules.list( resource_group_name=resource_group.name, network_security_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations.py index 63950013629d..a5f5d663fdac 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_user_configurations_list(self, resource_group): response = self.client.security_user_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_user_configurations_get(self, resource_group): response = self.client.security_user_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_security_user_configurations_create_or_update(self, resource_group): response = self.client.security_user_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -67,7 +67,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -75,12 +75,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_user_configurations_begin_delete(self, resource_group): response = self.client.security_user_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations_async.py index 4c0694586a14..57813082e7a1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_user_configurations_list(self, resource_group): response = self.client.security_user_configurations.list( resource_group_name=resource_group.name, network_manager_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_user_configurations_get(self, resource_group): response = await self.client.security_user_configurations.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_security_user_configurations_create_or_update(self, resource_group): response = await self.client.security_user_configurations.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -68,7 +68,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -76,13 +76,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_user_configurations_begin_delete(self, resource_group): response = await ( await self.client.security_user_configurations.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations.py index 8c331cc889bf..417301064f52 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_user_rule_collections_list(self, resource_group): response = self.client.security_user_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_user_rule_collections_get(self, resource_group): response = self.client.security_user_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_security_user_rule_collections_create_or_update(self, resource_group): response = self.client.security_user_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -71,7 +71,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -79,13 +79,13 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_user_rule_collections_begin_delete(self, resource_group): response = self.client.security_user_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations_async.py index 02b9cfdd1409..45e3fd62f612 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rule_collections_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_user_rule_collections_list(self, resource_group): response = self.client.security_user_rule_collections.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,13 +34,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_user_rule_collections_get(self, resource_group): response = await self.client.security_user_rule_collections.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -48,7 +48,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_security_user_rule_collections_create_or_update(self, resource_group): response = await self.client.security_user_rule_collections.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -72,7 +72,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -80,14 +80,14 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_user_rule_collections_begin_delete(self, resource_group): response = await ( await self.client.security_user_rule_collections.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations.py index 0d5b3bea9747..c3d1a23a13f0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_security_user_rules_list(self, resource_group): response = self.client.security_user_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,14 +34,14 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_security_user_rules_get(self, resource_group): response = self.client.security_user_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_security_user_rules_create_or_update(self, resource_group): response = self.client.security_user_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -79,7 +79,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -87,14 +87,14 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_security_user_rules_begin_delete(self, resource_group): response = self.client.security_user_rules.begin_delete( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations_async.py index 5265143ac405..f5d721dfdf1c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_security_user_rules_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_security_user_rules_list(self, resource_group): response = self.client.security_user_rules.list( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,14 +35,14 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_security_user_rules_get(self, resource_group): response = await self.client.security_user_rules.get( resource_group_name=resource_group.name, network_manager_name="str", configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_security_user_rules_create_or_update(self, resource_group): response = await self.client.security_user_rules.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -80,7 +80,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_security_user_rules_begin_delete(self, resource_group): response = await ( await self.client.security_user_rules.begin_delete( resource_group_name=resource_group.name, @@ -96,7 +96,7 @@ async def test_begin_delete(self, resource_group): configuration_name="str", rule_collection_name="str", rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations.py index 4919fa63b0af..f8bccaa94b95 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_service_association_links_list(self, resource_group): response = self.client.service_association_links.list( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations_async.py index 3e72b9ac2eb8..a3b18bc0eda7 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_association_links_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_service_association_links_list(self, resource_group): response = await self.client.service_association_links.list( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations.py index fcbf964027bc..229d6b310c2a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_service_endpoint_policies_begin_delete(self, resource_group): response = self.client.service_endpoint_policies.begin_delete( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_service_endpoint_policies_get(self, resource_group): response = self.client.service_endpoint_policies.get( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_service_endpoint_policies_begin_create_or_update(self, resource_group): response = self.client.service_endpoint_policies.begin_create_or_update( resource_group_name=resource_group.name, service_endpoint_policy_name="str", @@ -167,6 +167,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -258,6 +261,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1189,6 +1193,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2116,7 +2121,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2124,12 +2129,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_service_endpoint_policies_update_tags(self, resource_group): response = self.client.service_endpoint_policies.update_tags( resource_group_name=resource_group.name, service_endpoint_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2137,9 +2142,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_service_endpoint_policies_list(self, resource_group): response = self.client.service_endpoint_policies.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -2147,10 +2152,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_service_endpoint_policies_list_by_resource_group(self, resource_group): response = self.client.service_endpoint_policies.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations_async.py index 49b8a0edc5a3..4802f5e31789 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policies_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_service_endpoint_policies_begin_delete(self, resource_group): response = await ( await self.client.service_endpoint_policies.begin_delete( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_service_endpoint_policies_get(self, resource_group): response = await self.client.service_endpoint_policies.get( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_service_endpoint_policies_begin_create_or_update(self, resource_group): response = await ( await self.client.service_endpoint_policies.begin_create_or_update( resource_group_name=resource_group.name, @@ -171,6 +171,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -264,6 +267,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1204,6 +1208,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2133,7 +2138,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2142,12 +2147,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_service_endpoint_policies_update_tags(self, resource_group): response = await self.client.service_endpoint_policies.update_tags( resource_group_name=resource_group.name, service_endpoint_policy_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2155,9 +2160,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_service_endpoint_policies_list(self, resource_group): response = self.client.service_endpoint_policies.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -2165,10 +2170,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_service_endpoint_policies_list_by_resource_group(self, resource_group): response = self.client.service_endpoint_policies.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations.py index 96fda716753f..19c318ddd408 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_service_endpoint_policy_definitions_begin_delete(self, resource_group): response = self.client.service_endpoint_policy_definitions.begin_delete( resource_group_name=resource_group.name, service_endpoint_policy_name="str", service_endpoint_policy_definition_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_service_endpoint_policy_definitions_get(self, resource_group): response = self.client.service_endpoint_policy_definitions.get( resource_group_name=resource_group.name, service_endpoint_policy_name="str", service_endpoint_policy_definition_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_service_endpoint_policy_definitions_begin_create_or_update(self, resource_group): response = self.client.service_endpoint_policy_definitions.begin_create_or_update( resource_group_name=resource_group.name, service_endpoint_policy_name="str", @@ -61,7 +61,7 @@ def test_begin_create_or_update(self, resource_group): "serviceResources": ["str"], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_service_endpoint_policy_definitions_list_by_resource_group(self, resource_group): response = self.client.service_endpoint_policy_definitions.list_by_resource_group( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations_async.py index 7d3dd3440b03..00133103e54c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_endpoint_policy_definitions_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_service_endpoint_policy_definitions_begin_delete(self, resource_group): response = await ( await self.client.service_endpoint_policy_definitions.begin_delete( resource_group_name=resource_group.name, service_endpoint_policy_name="str", service_endpoint_policy_definition_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_service_endpoint_policy_definitions_get(self, resource_group): response = await self.client.service_endpoint_policy_definitions.get( resource_group_name=resource_group.name, service_endpoint_policy_name="str", service_endpoint_policy_definition_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_service_endpoint_policy_definitions_begin_create_or_update(self, resource_group): response = await ( await self.client.service_endpoint_policy_definitions.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): "serviceResources": ["str"], "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_service_endpoint_policy_definitions_list_by_resource_group(self, resource_group): response = self.client.service_endpoint_policy_definitions.list_by_resource_group( resource_group_name=resource_group.name, service_endpoint_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations.py index f167542caaf3..7bee93fcbdd9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_service_tag_information_list(self, resource_group): response = self.client.service_tag_information.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations_async.py index e429048dec55..29b11a4813fb 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tag_information_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_service_tag_information_list(self, resource_group): response = self.client.service_tag_information.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations.py index 48432642a535..709be31f3b79 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_service_tags_list(self, resource_group): response = self.client.service_tags.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations_async.py index 5287dc98150d..b9384d670dbc 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_service_tags_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_service_tags_list(self, resource_group): response = await self.client.service_tags.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations.py new file mode 100644 index 000000000000..26f39b72682b --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations.py @@ -0,0 +1,74 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementStaticCidrsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_cidrs_list(self, resource_group): + response = self.client.static_cidrs.list( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_cidrs_create(self, resource_group): + response = self.client.static_cidrs.create( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_cidrs_get(self, resource_group): + response = self.client.static_cidrs.get( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_cidrs_begin_delete(self, resource_group): + response = self.client.static_cidrs.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations_async.py new file mode 100644 index 000000000000..03e00550861e --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_cidrs_operations_async.py @@ -0,0 +1,77 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementStaticCidrsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_cidrs_list(self, resource_group): + response = self.client.static_cidrs.list( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_cidrs_create(self, resource_group): + response = await self.client.static_cidrs.create( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_cidrs_get(self, resource_group): + response = await self.client.static_cidrs.get( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_cidrs_begin_delete(self, resource_group): + response = await ( + await self.client.static_cidrs.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + pool_name="str", + static_cidr_name="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations.py index 83360da59879..e29e0eb3d3b3 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_static_members_get(self, resource_group): response = self.client.static_members.get( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", static_member_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_static_members_create_or_update(self, resource_group): response = self.client.static_members.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -57,7 +57,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -65,13 +65,13 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_static_members_delete(self, resource_group): response = self.client.static_members.delete( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", static_member_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -79,12 +79,12 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_static_members_list(self, resource_group): response = self.client.static_members.list( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations_async.py index 13df5a16eb93..bbe120cf8ca9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_static_members_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_static_members_get(self, resource_group): response = await self.client.static_members.get( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", static_member_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -35,7 +35,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_static_members_create_or_update(self, resource_group): response = await self.client.static_members.create_or_update( resource_group_name=resource_group.name, network_manager_name="str", @@ -58,7 +58,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -66,13 +66,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_static_members_delete(self, resource_group): response = await self.client.static_members.delete( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", static_member_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -80,12 +80,12 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_static_members_list(self, resource_group): response = self.client.static_members.list( resource_group_name=resource_group.name, network_manager_name="str", network_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations.py index 7db31a78bbdb..cbe6e4e4f5db 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_subnets_begin_delete(self, resource_group): response = self.client.subnets.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_subnets_get(self, resource_group): response = self.client.subnets.get( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_subnets_begin_create_or_update(self, resource_group): response = self.client.subnets.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_name="str", @@ -147,6 +147,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -238,6 +241,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1159,6 +1163,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2098,7 +2103,7 @@ def test_begin_create_or_update(self, resource_group): "sharingScope": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2106,7 +2111,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_prepare_network_policies(self, resource_group): + def test_subnets_begin_prepare_network_policies(self, resource_group): response = self.client.subnets.begin_prepare_network_policies( resource_group_name=resource_group.name, virtual_network_name="str", @@ -2127,7 +2132,7 @@ def test_begin_prepare_network_policies(self, resource_group): ], "serviceName": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2135,13 +2140,13 @@ def test_begin_prepare_network_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_unprepare_network_policies(self, resource_group): + def test_subnets_begin_unprepare_network_policies(self, resource_group): response = self.client.subnets.begin_unprepare_network_policies( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", unprepare_network_policies_request_parameters={"serviceName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2149,11 +2154,11 @@ def test_begin_unprepare_network_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_subnets_list(self, resource_group): response = self.client.subnets.list( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations_async.py index c20bc43b4646..eb6a0ee39606 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subnets_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_subnets_begin_delete(self, resource_group): response = await ( await self.client.subnets.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_subnets_get(self, resource_group): response = await self.client.subnets.get( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_subnets_begin_create_or_update(self, resource_group): response = await ( await self.client.subnets.begin_create_or_update( resource_group_name=resource_group.name, @@ -151,6 +151,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -242,6 +245,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1171,6 +1175,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2112,7 +2117,7 @@ async def test_begin_create_or_update(self, resource_group): "sharingScope": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2121,7 +2126,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_prepare_network_policies(self, resource_group): + async def test_subnets_begin_prepare_network_policies(self, resource_group): response = await ( await self.client.subnets.begin_prepare_network_policies( resource_group_name=resource_group.name, @@ -2143,7 +2148,7 @@ async def test_begin_prepare_network_policies(self, resource_group): ], "serviceName": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2152,14 +2157,14 @@ async def test_begin_prepare_network_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_unprepare_network_policies(self, resource_group): + async def test_subnets_begin_unprepare_network_policies(self, resource_group): response = await ( await self.client.subnets.begin_unprepare_network_policies( resource_group_name=resource_group.name, virtual_network_name="str", subnet_name="str", unprepare_network_policies_request_parameters={"serviceName": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2168,11 +2173,11 @@ async def test_begin_unprepare_network_policies(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_subnets_list(self, resource_group): response = self.client.subnets.list( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations.py index 8b595d48bf3e..2148745400b2 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_subscription_network_manager_connections_create_or_update(self, resource_group): response = self.client.subscription_network_manager_connections.create_or_update( network_manager_connection_name="str", parameters={ @@ -40,7 +40,7 @@ def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -48,10 +48,10 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_subscription_network_manager_connections_get(self, resource_group): response = self.client.subscription_network_manager_connections.get( network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -59,10 +59,10 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_subscription_network_manager_connections_delete(self, resource_group): response = self.client.subscription_network_manager_connections.delete( network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -70,9 +70,9 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_subscription_network_manager_connections_list(self, resource_group): response = self.client.subscription_network_manager_connections.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations_async.py index d1a604f05fd8..44d354e9f439 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_subscription_network_manager_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_subscription_network_manager_connections_create_or_update(self, resource_group): response = await self.client.subscription_network_manager_connections.create_or_update( network_manager_connection_name="str", parameters={ @@ -41,7 +41,7 @@ async def test_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,10 +49,10 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_subscription_network_manager_connections_get(self, resource_group): response = await self.client.subscription_network_manager_connections.get( network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -60,10 +60,10 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_subscription_network_manager_connections_delete(self, resource_group): response = await self.client.subscription_network_manager_connections.delete( network_manager_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -71,9 +71,9 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_subscription_network_manager_connections_list(self, resource_group): response = self.client.subscription_network_manager_connections.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations.py index 33b4f54c6794..e8121cb90398 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_usages_list(self, resource_group): response = self.client.usages.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations_async.py index cddb637c5c55..f76d7d59aeb1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_usages_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_usages_list(self, resource_group): response = self.client.usages.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations.py new file mode 100644 index 000000000000..68cd2917b4dc --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations.py @@ -0,0 +1,99 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementVerifierWorkspacesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_verifier_workspaces_list(self, resource_group): + response = self.client.verifier_workspaces.list( + resource_group_name=resource_group.name, + network_manager_name="str", + api_version="2024-05-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_verifier_workspaces_get(self, resource_group): + response = self.client.verifier_workspaces.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_verifier_workspaces_create(self, resource_group): + response = self.client.verifier_workspaces.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + body={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_verifier_workspaces_update(self, resource_group): + response = self.client.verifier_workspaces.update( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_verifier_workspaces_begin_delete(self, resource_group): + response = self.client.verifier_workspaces.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations_async.py new file mode 100644 index 000000000000..e03f69915ce8 --- /dev/null +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_verifier_workspaces_operations_async.py @@ -0,0 +1,102 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNetworkManagementVerifierWorkspacesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_verifier_workspaces_list(self, resource_group): + response = self.client.verifier_workspaces.list( + resource_group_name=resource_group.name, + network_manager_name="str", + api_version="2024-05-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_verifier_workspaces_get(self, resource_group): + response = await self.client.verifier_workspaces.get( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_verifier_workspaces_create(self, resource_group): + response = await self.client.verifier_workspaces.create( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + body={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_verifier_workspaces_update(self, resource_group): + response = await self.client.verifier_workspaces.update( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_verifier_workspaces_begin_delete(self, resource_group): + response = await ( + await self.client.verifier_workspaces.begin_delete( + resource_group_name=resource_group.name, + network_manager_name="str", + workspace_name="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations.py index 865b345564a9..b11ef8d1c292 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vip_swap_get(self, resource_group): response = self.client.vip_swap.get( group_name="str", resource_name="str", singleton_resource="swap", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,13 +33,13 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create(self, resource_group): + def test_vip_swap_begin_create(self, resource_group): response = self.client.vip_swap.begin_create( group_name="str", resource_name="str", parameters={"id": "str", "name": "str", "properties": {"slotType": "str"}, "type": "str"}, singleton_resource="swap", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -47,11 +47,11 @@ def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_vip_swap_list(self, resource_group): response = self.client.vip_swap.list( group_name="str", resource_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations_async.py index eab2e148a180..59a3a03fbe89 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vip_swap_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vip_swap_get(self, resource_group): response = await self.client.vip_swap.get( group_name="str", resource_name="str", singleton_resource="swap", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,14 +34,14 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create(self, resource_group): + async def test_vip_swap_begin_create(self, resource_group): response = await ( await self.client.vip_swap.begin_create( group_name="str", resource_name="str", parameters={"id": "str", "name": "str", "properties": {"slotType": "str"}, "type": "str"}, singleton_resource="swap", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -50,11 +50,11 @@ async def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_vip_swap_list(self, resource_group): response = await self.client.vip_swap.list( group_name="str", resource_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations.py index 2cdf2f0075b5..5869a6e2d603 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_appliance_sites_begin_delete(self, resource_group): response = self.client.virtual_appliance_sites.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_appliance_sites_get(self, resource_group): response = self.client.virtual_appliance_sites.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_appliance_sites_begin_create_or_update(self, resource_group): response = self.client.virtual_appliance_sites.begin_create_or_update( resource_group_name=resource_group.name, network_virtual_appliance_name="str", @@ -60,7 +60,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -68,11 +68,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_appliance_sites_list(self, resource_group): response = self.client.virtual_appliance_sites.list( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations_async.py index 2004fe68ecbe..abfbd089e511 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_sites_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_appliance_sites_begin_delete(self, resource_group): response = await ( await self.client.virtual_appliance_sites.begin_delete( resource_group_name=resource_group.name, network_virtual_appliance_name="str", site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_appliance_sites_get(self, resource_group): response = await self.client.virtual_appliance_sites.get( resource_group_name=resource_group.name, network_virtual_appliance_name="str", site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_appliance_sites_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_appliance_sites.begin_create_or_update( resource_group_name=resource_group.name, @@ -64,7 +64,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -73,11 +73,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_appliance_sites_list(self, resource_group): response = self.client.virtual_appliance_sites.list( resource_group_name=resource_group.name, network_virtual_appliance_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations.py index aca7cba3fb04..0b127d355edc 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations.py @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_appliance_skus_list(self, resource_group): response = self.client.virtual_appliance_skus.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -30,10 +30,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_appliance_skus_get(self, resource_group): response = self.client.virtual_appliance_skus.get( sku_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations_async.py index d8a748fc83f0..481b269f279c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_appliance_skus_operations_async.py @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_appliance_skus_list(self, resource_group): response = self.client.virtual_appliance_skus.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -31,10 +31,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_appliance_skus_get(self, resource_group): response = await self.client.virtual_appliance_skus.get( sku_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations.py index a7af9ad625bc..daa750811b5a 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_hub_bgp_connection_get(self, resource_group): response = self.client.virtual_hub_bgp_connection.get( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_hub_bgp_connection_begin_create_or_update(self, resource_group): response = self.client.virtual_hub_bgp_connection.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -49,7 +49,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -57,12 +57,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_hub_bgp_connection_begin_delete(self, resource_group): response = self.client.virtual_hub_bgp_connection.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations_async.py index b33bd952c3bc..b4305a3f6f95 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connection_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_hub_bgp_connection_get(self, resource_group): response = await self.client.virtual_hub_bgp_connection.get( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_hub_bgp_connection_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_hub_bgp_connection.begin_create_or_update( resource_group_name=resource_group.name, @@ -51,7 +51,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -60,13 +60,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_hub_bgp_connection_begin_delete(self, resource_group): response = await ( await self.client.virtual_hub_bgp_connection.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations.py index 8e6c0add748a..0a61dcec6f09 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_hub_bgp_connections_list(self, resource_group): response = self.client.virtual_hub_bgp_connections.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_learned_routes(self, resource_group): + def test_virtual_hub_bgp_connections_begin_list_learned_routes(self, resource_group): response = self.client.virtual_hub_bgp_connections.begin_list_learned_routes( resource_group_name=resource_group.name, hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -45,12 +45,12 @@ def test_begin_list_learned_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_advertised_routes(self, resource_group): + def test_virtual_hub_bgp_connections_begin_list_advertised_routes(self, resource_group): response = self.client.virtual_hub_bgp_connections.begin_list_advertised_routes( resource_group_name=resource_group.name, hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations_async.py index f6928bcfa15c..4829a27d7592 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_bgp_connections_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_hub_bgp_connections_list(self, resource_group): response = self.client.virtual_hub_bgp_connections.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,13 +33,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_learned_routes(self, resource_group): + async def test_virtual_hub_bgp_connections_begin_list_learned_routes(self, resource_group): response = await ( await self.client.virtual_hub_bgp_connections.begin_list_learned_routes( resource_group_name=resource_group.name, hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -48,13 +48,13 @@ async def test_begin_list_learned_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_advertised_routes(self, resource_group): + async def test_virtual_hub_bgp_connections_begin_list_advertised_routes(self, resource_group): response = await ( await self.client.virtual_hub_bgp_connections.begin_list_advertised_routes( resource_group_name=resource_group.name, hub_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations.py index 62d8cdf3d148..6485f9796e5d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_hub_ip_configuration_get(self, resource_group): response = self.client.virtual_hub_ip_configuration.get( resource_group_name=resource_group.name, virtual_hub_name="str", ip_config_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_hub_ip_configuration_begin_create_or_update(self, resource_group): response = self.client.virtual_hub_ip_configuration.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -106,6 +106,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -199,6 +202,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -849,6 +853,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1640,6 +1645,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1731,6 +1739,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2660,6 +2669,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3603,7 +3613,7 @@ def test_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -3611,12 +3621,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_hub_ip_configuration_begin_delete(self, resource_group): response = self.client.virtual_hub_ip_configuration.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", ip_config_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -3624,11 +3634,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_hub_ip_configuration_list(self, resource_group): response = self.client.virtual_hub_ip_configuration.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations_async.py index 1eca2096dba8..f58b70d2d4f4 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_ip_configuration_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_hub_ip_configuration_get(self, resource_group): response = await self.client.virtual_hub_ip_configuration.get( resource_group_name=resource_group.name, virtual_hub_name="str", ip_config_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_hub_ip_configuration_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_hub_ip_configuration.begin_create_or_update( resource_group_name=resource_group.name, @@ -108,6 +108,9 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -201,6 +204,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -855,6 +859,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1650,6 +1655,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1741,6 +1749,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2672,6 +2681,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3624,7 +3634,7 @@ async def test_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -3633,13 +3643,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_hub_ip_configuration_begin_delete(self, resource_group): response = await ( await self.client.virtual_hub_ip_configuration.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", ip_config_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -3648,11 +3658,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_hub_ip_configuration_list(self, resource_group): response = self.client.virtual_hub_ip_configuration.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations.py index 0910a0244b0b..2c3215865232 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_hub_route_table_v2_s_get(self, resource_group): response = self.client.virtual_hub_route_table_v2_s.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_hub_route_table_v2_s_begin_create_or_update(self, resource_group): response = self.client.virtual_hub_route_table_v2_s.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -48,7 +48,7 @@ def test_begin_create_or_update(self, resource_group): {"destinationType": "str", "destinations": ["str"], "nextHopType": "str", "nextHops": ["str"]} ], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -56,12 +56,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_hub_route_table_v2_s_begin_delete(self, resource_group): response = self.client.virtual_hub_route_table_v2_s.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -69,11 +69,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_hub_route_table_v2_s_list(self, resource_group): response = self.client.virtual_hub_route_table_v2_s.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations_async.py index e55ee6d24409..f96268766c73 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hub_route_table_v2_soperations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_hub_route_table_v2_s_get(self, resource_group): response = await self.client.virtual_hub_route_table_v2_s.get( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_hub_route_table_v2_s_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_hub_route_table_v2_s.begin_create_or_update( resource_group_name=resource_group.name, @@ -50,7 +50,7 @@ async def test_begin_create_or_update(self, resource_group): {"destinationType": "str", "destinations": ["str"], "nextHopType": "str", "nextHops": ["str"]} ], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -59,13 +59,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_hub_route_table_v2_s_begin_delete(self, resource_group): response = await ( await self.client.virtual_hub_route_table_v2_s.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", route_table_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,11 +74,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_hub_route_table_v2_s_list(self, resource_group): response = self.client.virtual_hub_route_table_v2_s.list( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations.py index 10d746d9811a..7a7683b4ad24 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_hubs_get(self, resource_group): response = self.client.virtual_hubs.get( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_hubs_begin_create_or_update(self, resource_group): response = self.client.virtual_hubs.begin_create_or_update( resource_group_name=resource_group.name, virtual_hub_name="str", @@ -83,7 +83,7 @@ def test_begin_create_or_update(self, resource_group): "virtualWan": {"id": "str"}, "vpnGateway": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,12 +91,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_virtual_hubs_update_tags(self, resource_group): response = self.client.virtual_hubs.update_tags( resource_group_name=resource_group.name, virtual_hub_name="str", virtual_hub_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -104,11 +104,11 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_hubs_begin_delete(self, resource_group): response = self.client.virtual_hubs.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -116,10 +116,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_virtual_hubs_list_by_resource_group(self, resource_group): response = self.client.virtual_hubs.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -127,9 +127,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_hubs_list(self, resource_group): response = self.client.virtual_hubs.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -137,11 +137,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_effective_virtual_hub_routes(self, resource_group): + def test_virtual_hubs_begin_get_effective_virtual_hub_routes(self, resource_group): response = self.client.virtual_hubs.begin_get_effective_virtual_hub_routes( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -149,12 +149,12 @@ def test_begin_get_effective_virtual_hub_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_inbound_routes(self, resource_group): + def test_virtual_hubs_begin_get_inbound_routes(self, resource_group): response = self.client.virtual_hubs.begin_get_inbound_routes( resource_group_name=resource_group.name, virtual_hub_name="str", get_inbound_routes_parameters={"connectionType": "str", "resourceUri": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -162,12 +162,12 @@ def test_begin_get_inbound_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_outbound_routes(self, resource_group): + def test_virtual_hubs_begin_get_outbound_routes(self, resource_group): response = self.client.virtual_hubs.begin_get_outbound_routes( resource_group_name=resource_group.name, virtual_hub_name="str", get_outbound_routes_parameters={"connectionType": "str", "resourceUri": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations_async.py index fb444f64ce4a..6b0e883c50f6 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_hubs_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_hubs_get(self, resource_group): response = await self.client.virtual_hubs.get( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_hubs_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_hubs.begin_create_or_update( resource_group_name=resource_group.name, @@ -85,7 +85,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualWan": {"id": "str"}, "vpnGateway": {"id": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -94,12 +94,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_virtual_hubs_update_tags(self, resource_group): response = await self.client.virtual_hubs.update_tags( resource_group_name=resource_group.name, virtual_hub_name="str", virtual_hub_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -107,12 +107,12 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_hubs_begin_delete(self, resource_group): response = await ( await self.client.virtual_hubs.begin_delete( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -121,10 +121,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_virtual_hubs_list_by_resource_group(self, resource_group): response = self.client.virtual_hubs.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -132,9 +132,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_hubs_list(self, resource_group): response = self.client.virtual_hubs.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -142,12 +142,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_effective_virtual_hub_routes(self, resource_group): + async def test_virtual_hubs_begin_get_effective_virtual_hub_routes(self, resource_group): response = await ( await self.client.virtual_hubs.begin_get_effective_virtual_hub_routes( resource_group_name=resource_group.name, virtual_hub_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -156,13 +156,13 @@ async def test_begin_get_effective_virtual_hub_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_inbound_routes(self, resource_group): + async def test_virtual_hubs_begin_get_inbound_routes(self, resource_group): response = await ( await self.client.virtual_hubs.begin_get_inbound_routes( resource_group_name=resource_group.name, virtual_hub_name="str", get_inbound_routes_parameters={"connectionType": "str", "resourceUri": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -171,13 +171,13 @@ async def test_begin_get_inbound_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_outbound_routes(self, resource_group): + async def test_virtual_hubs_begin_get_outbound_routes(self, resource_group): response = await ( await self.client.virtual_hubs.begin_get_outbound_routes( resource_group_name=resource_group.name, virtual_hub_name="str", get_outbound_routes_parameters={"connectionType": "str", "resourceUri": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations.py index 69a1b7ba49cd..304980c347f7 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_network_gateway_connections_begin_create_or_update(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", @@ -45,7 +45,12 @@ def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -125,11 +130,21 @@ def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -204,7 +219,12 @@ def test_begin_create_or_update(self, resource_group): "fqdn": "str", "gatewayIpAddress": "str", "id": "str", - "localNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "location": "str", "name": "str", "provisioningState": "str", @@ -252,7 +272,12 @@ def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -332,11 +357,21 @@ def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -367,7 +402,7 @@ def test_begin_create_or_update(self, resource_group): "vpnType": "str", }, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -375,11 +410,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_network_gateway_connections_get(self, resource_group): response = self.client.virtual_network_gateway_connections.get( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -387,11 +422,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_network_gateway_connections_begin_delete(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -399,12 +434,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_virtual_network_gateway_connections_begin_update_tags(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_update_tags( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -412,12 +447,12 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_set_shared_key(self, resource_group): + def test_virtual_network_gateway_connections_begin_set_shared_key(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_set_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"value": "str", "id": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -425,11 +460,11 @@ def test_begin_set_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_shared_key(self, resource_group): + def test_virtual_network_gateway_connections_get_shared_key(self, resource_group): response = self.client.virtual_network_gateway_connections.get_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -437,10 +472,10 @@ def test_get_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_network_gateway_connections_list(self, resource_group): response = self.client.virtual_network_gateway_connections.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -448,12 +483,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset_shared_key(self, resource_group): + def test_virtual_network_gateway_connections_begin_reset_shared_key(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_reset_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"keyLength": 0}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -461,11 +496,11 @@ def test_begin_reset_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_packet_capture(self, resource_group): + def test_virtual_network_gateway_connections_begin_start_packet_capture(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_start_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -473,12 +508,12 @@ def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop_packet_capture(self, resource_group): + def test_virtual_network_gateway_connections_begin_stop_packet_capture(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_stop_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"sasUrl": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -486,11 +521,11 @@ def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_ike_sas(self, resource_group): + def test_virtual_network_gateway_connections_begin_get_ike_sas(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_get_ike_sas( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -498,11 +533,11 @@ def test_begin_get_ike_sas(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset_connection(self, resource_group): + def test_virtual_network_gateway_connections_begin_reset_connection(self, resource_group): response = self.client.virtual_network_gateway_connections.begin_reset_connection( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations_async.py index 36e319d494bc..a3093b9ef2ef 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_connections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_network_gateway_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -47,7 +47,12 @@ async def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -127,11 +132,25 @@ async def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -212,7 +231,12 @@ async def test_begin_create_or_update(self, resource_group): "fqdn": "str", "gatewayIpAddress": "str", "id": "str", - "localNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "location": "str", "name": "str", "provisioningState": "str", @@ -260,7 +284,12 @@ async def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -340,11 +369,25 @@ async def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -381,7 +424,7 @@ async def test_begin_create_or_update(self, resource_group): "vpnType": "str", }, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -390,11 +433,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_network_gateway_connections_get(self, resource_group): response = await self.client.virtual_network_gateway_connections.get( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -402,12 +445,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_network_gateway_connections_begin_delete(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -416,13 +459,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_virtual_network_gateway_connections_begin_update_tags(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_update_tags( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -431,13 +474,13 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_set_shared_key(self, resource_group): + async def test_virtual_network_gateway_connections_begin_set_shared_key(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_set_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"value": "str", "id": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -446,11 +489,11 @@ async def test_begin_set_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_shared_key(self, resource_group): + async def test_virtual_network_gateway_connections_get_shared_key(self, resource_group): response = await self.client.virtual_network_gateway_connections.get_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -458,10 +501,10 @@ async def test_get_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_network_gateway_connections_list(self, resource_group): response = self.client.virtual_network_gateway_connections.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -469,13 +512,13 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset_shared_key(self, resource_group): + async def test_virtual_network_gateway_connections_begin_reset_shared_key(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_reset_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"keyLength": 0}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -484,12 +527,12 @@ async def test_begin_reset_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_packet_capture(self, resource_group): + async def test_virtual_network_gateway_connections_begin_start_packet_capture(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_start_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -498,13 +541,13 @@ async def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop_packet_capture(self, resource_group): + async def test_virtual_network_gateway_connections_begin_stop_packet_capture(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_stop_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"sasUrl": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -513,12 +556,12 @@ async def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_ike_sas(self, resource_group): + async def test_virtual_network_gateway_connections_begin_get_ike_sas(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_get_ike_sas( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -527,12 +570,12 @@ async def test_begin_get_ike_sas(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset_connection(self, resource_group): + async def test_virtual_network_gateway_connections_begin_reset_connection(self, resource_group): response = await ( await self.client.virtual_network_gateway_connections.begin_reset_connection( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations.py index fdd532526d20..39bbf79047f1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_network_gateway_nat_rules_get(self, resource_group): response = self.client.virtual_network_gateway_nat_rules.get( resource_group_name=resource_group.name, virtual_network_gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_network_gateway_nat_rules_begin_create_or_update(self, resource_group): response = self.client.virtual_network_gateway_nat_rules.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_gateway_name="str", @@ -49,7 +49,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -57,12 +57,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_network_gateway_nat_rules_begin_delete(self, resource_group): response = self.client.virtual_network_gateway_nat_rules.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -70,11 +70,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_virtual_network_gateway(self, resource_group): + def test_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway(self, resource_group): response = self.client.virtual_network_gateway_nat_rules.list_by_virtual_network_gateway( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations_async.py index fd538a49ceeb..30559927c78c 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateway_nat_rules_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_network_gateway_nat_rules_get(self, resource_group): response = await self.client.virtual_network_gateway_nat_rules.get( resource_group_name=resource_group.name, virtual_network_gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_network_gateway_nat_rules_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_network_gateway_nat_rules.begin_create_or_update( resource_group_name=resource_group.name, @@ -51,7 +51,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -60,13 +60,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_network_gateway_nat_rules_begin_delete(self, resource_group): response = await ( await self.client.virtual_network_gateway_nat_rules.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_name="str", nat_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -75,11 +75,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_virtual_network_gateway(self, resource_group): + async def test_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway(self, resource_group): response = self.client.virtual_network_gateway_nat_rules.list_by_virtual_network_gateway( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations.py index c5bee73136d9..3e13fd0665ce 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_network_gateways_begin_create_or_update(self, resource_group): response = self.client.virtual_network_gateways.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_gateway_name="str", @@ -43,7 +43,12 @@ def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -123,11 +128,21 @@ def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -151,7 +166,7 @@ def test_begin_create_or_update(self, resource_group): "vpnGatewayGeneration": "str", "vpnType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -159,11 +174,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_network_gateways_get(self, resource_group): response = self.client.virtual_network_gateways.get( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -171,11 +186,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_network_gateways_begin_delete(self, resource_group): response = self.client.virtual_network_gateways.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -183,12 +198,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_virtual_network_gateways_begin_update_tags(self, resource_group): response = self.client.virtual_network_gateways.begin_update_tags( resource_group_name=resource_group.name, virtual_network_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -196,10 +211,10 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_network_gateways_list(self, resource_group): response = self.client.virtual_network_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -207,11 +222,11 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_connections(self, resource_group): + def test_virtual_network_gateways_list_connections(self, resource_group): response = self.client.virtual_network_gateways.list_connections( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -219,11 +234,11 @@ def test_list_connections(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset(self, resource_group): + def test_virtual_network_gateways_begin_reset(self, resource_group): response = self.client.virtual_network_gateways.begin_reset( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -231,11 +246,11 @@ def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset_vpn_client_shared_key(self, resource_group): + def test_virtual_network_gateways_begin_reset_vpn_client_shared_key(self, resource_group): response = self.client.virtual_network_gateways.begin_reset_vpn_client_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -243,7 +258,7 @@ def test_begin_reset_vpn_client_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_generatevpnclientpackage(self, resource_group): + def test_virtual_network_gateways_begin_generatevpnclientpackage(self, resource_group): response = self.client.virtual_network_gateways.begin_generatevpnclientpackage( resource_group_name=resource_group.name, virtual_network_gateway_name="str", @@ -253,7 +268,7 @@ def test_begin_generatevpnclientpackage(self, resource_group): "processorArchitecture": "str", "radiusServerAuthCertificate": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -261,7 +276,7 @@ def test_begin_generatevpnclientpackage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_generate_vpn_profile(self, resource_group): + def test_virtual_network_gateways_begin_generate_vpn_profile(self, resource_group): response = self.client.virtual_network_gateways.begin_generate_vpn_profile( resource_group_name=resource_group.name, virtual_network_gateway_name="str", @@ -271,7 +286,7 @@ def test_begin_generate_vpn_profile(self, resource_group): "processorArchitecture": "str", "radiusServerAuthCertificate": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -279,11 +294,11 @@ def test_begin_generate_vpn_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_vpn_profile_package_url(self, resource_group): + def test_virtual_network_gateways_begin_get_vpn_profile_package_url(self, resource_group): response = self.client.virtual_network_gateways.begin_get_vpn_profile_package_url( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -291,11 +306,11 @@ def test_begin_get_vpn_profile_package_url(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_bgp_peer_status(self, resource_group): + def test_virtual_network_gateways_begin_get_bgp_peer_status(self, resource_group): response = self.client.virtual_network_gateways.begin_get_bgp_peer_status( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -303,11 +318,11 @@ def test_begin_get_bgp_peer_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_supported_vpn_devices(self, resource_group): + def test_virtual_network_gateways_supported_vpn_devices(self, resource_group): response = self.client.virtual_network_gateways.supported_vpn_devices( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -315,11 +330,11 @@ def test_supported_vpn_devices(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_learned_routes(self, resource_group): + def test_virtual_network_gateways_begin_get_learned_routes(self, resource_group): response = self.client.virtual_network_gateways.begin_get_learned_routes( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -327,12 +342,12 @@ def test_begin_get_learned_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_advertised_routes(self, resource_group): + def test_virtual_network_gateways_begin_get_advertised_routes(self, resource_group): response = self.client.virtual_network_gateways.begin_get_advertised_routes( resource_group_name=resource_group.name, virtual_network_gateway_name="str", peer="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -340,7 +355,7 @@ def test_begin_get_advertised_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): + def test_virtual_network_gateways_begin_set_vpnclient_ipsec_parameters(self, resource_group): response = self.client.virtual_network_gateways.begin_set_vpnclient_ipsec_parameters( resource_group_name=resource_group.name, virtual_network_gateway_name="str", @@ -354,7 +369,7 @@ def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): "saDataSizeKilobytes": 0, "saLifeTimeSeconds": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -362,11 +377,11 @@ def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_vpnclient_ipsec_parameters(self, resource_group): + def test_virtual_network_gateways_begin_get_vpnclient_ipsec_parameters(self, resource_group): response = self.client.virtual_network_gateways.begin_get_vpnclient_ipsec_parameters( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -374,12 +389,12 @@ def test_begin_get_vpnclient_ipsec_parameters(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_vpn_device_configuration_script(self, resource_group): + def test_virtual_network_gateways_vpn_device_configuration_script(self, resource_group): response = self.client.virtual_network_gateways.vpn_device_configuration_script( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"deviceFamily": "str", "firmwareVersion": "str", "vendor": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -387,11 +402,11 @@ def test_vpn_device_configuration_script(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_packet_capture(self, resource_group): + def test_virtual_network_gateways_begin_start_packet_capture(self, resource_group): response = self.client.virtual_network_gateways.begin_start_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -399,12 +414,70 @@ def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop_packet_capture(self, resource_group): + def test_virtual_network_gateways_begin_stop_packet_capture(self, resource_group): response = self.client.virtual_network_gateways.begin_stop_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_name="str", parameters={"sasUrl": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_network_gateways_begin_get_failover_all_test_details(self, resource_group): + response = self.client.virtual_network_gateways.begin_get_failover_all_test_details( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + type="str", + fetch_latest=bool, + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_network_gateways_begin_get_failover_single_test_details(self, resource_group): + response = self.client.virtual_network_gateways.begin_get_failover_single_test_details( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + peering_location="str", + failover_test_id="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_network_gateways_begin_start_express_route_site_failover_simulation(self, resource_group): + response = self.client.virtual_network_gateways.begin_start_express_route_site_failover_simulation( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + peering_location="str", + api_version="2024-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_network_gateways_begin_stop_express_route_site_failover_simulation(self, resource_group): + response = self.client.virtual_network_gateways.begin_stop_express_route_site_failover_simulation( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + stop_parameters={ + "details": [{"failoverConnectionName": "str", "failoverLocation": "str", "isVerified": bool}], + "peeringLocation": "str", + "wasSimulationSuccessful": bool, + }, + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -412,11 +485,11 @@ def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_vpnclient_connection_health(self, resource_group): + def test_virtual_network_gateways_begin_get_vpnclient_connection_health(self, resource_group): response = self.client.virtual_network_gateways.begin_get_vpnclient_connection_health( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -424,12 +497,12 @@ def test_begin_get_vpnclient_connection_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_disconnect_virtual_network_gateway_vpn_connections(self, resource_group): + def test_virtual_network_gateways_begin_disconnect_virtual_network_gateway_vpn_connections(self, resource_group): response = self.client.virtual_network_gateways.begin_disconnect_virtual_network_gateway_vpn_connections( resource_group_name=resource_group.name, virtual_network_gateway_name="str", request={"vpnConnectionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations_async.py index ce8f079f13f4..fd83b0dcf75d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_gateways_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_network_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -45,7 +45,12 @@ async def test_begin_create_or_update(self, resource_group): ], "peerWeight": 0, }, - "customRoutes": {"addressPrefixes": ["str"]}, + "customRoutes": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "disableIPSecReplayProtection": bool, "enableBgp": bool, "enableBgpRouteTranslationForNat": bool, @@ -125,11 +130,21 @@ async def test_begin_create_or_update(self, resource_group): "name": "str", "provisioningState": "str", "virtualNetworkGatewayPolicyGroups": [{"id": "str"}], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "vpnAuthenticationTypes": ["str"], - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "vpnClientIpsecPolicies": [ { "dhGroup": "str", @@ -159,7 +174,7 @@ async def test_begin_create_or_update(self, resource_group): "vpnGatewayGeneration": "str", "vpnType": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -168,11 +183,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_network_gateways_get(self, resource_group): response = await self.client.virtual_network_gateways.get( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -180,12 +195,12 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_network_gateways_begin_delete(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_delete( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -194,13 +209,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_virtual_network_gateways_begin_update_tags(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_update_tags( resource_group_name=resource_group.name, virtual_network_gateway_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -209,10 +224,10 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_network_gateways_list(self, resource_group): response = self.client.virtual_network_gateways.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -220,11 +235,11 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_connections(self, resource_group): + async def test_virtual_network_gateways_list_connections(self, resource_group): response = self.client.virtual_network_gateways.list_connections( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -232,12 +247,12 @@ async def test_list_connections(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset(self, resource_group): + async def test_virtual_network_gateways_begin_reset(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_reset( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -246,12 +261,12 @@ async def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset_vpn_client_shared_key(self, resource_group): + async def test_virtual_network_gateways_begin_reset_vpn_client_shared_key(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_reset_vpn_client_shared_key( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -260,7 +275,7 @@ async def test_begin_reset_vpn_client_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_generatevpnclientpackage(self, resource_group): + async def test_virtual_network_gateways_begin_generatevpnclientpackage(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_generatevpnclientpackage( resource_group_name=resource_group.name, @@ -271,7 +286,7 @@ async def test_begin_generatevpnclientpackage(self, resource_group): "processorArchitecture": "str", "radiusServerAuthCertificate": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -280,7 +295,7 @@ async def test_begin_generatevpnclientpackage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_generate_vpn_profile(self, resource_group): + async def test_virtual_network_gateways_begin_generate_vpn_profile(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_generate_vpn_profile( resource_group_name=resource_group.name, @@ -291,7 +306,7 @@ async def test_begin_generate_vpn_profile(self, resource_group): "processorArchitecture": "str", "radiusServerAuthCertificate": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -300,12 +315,12 @@ async def test_begin_generate_vpn_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_vpn_profile_package_url(self, resource_group): + async def test_virtual_network_gateways_begin_get_vpn_profile_package_url(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_vpn_profile_package_url( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -314,12 +329,12 @@ async def test_begin_get_vpn_profile_package_url(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_bgp_peer_status(self, resource_group): + async def test_virtual_network_gateways_begin_get_bgp_peer_status(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_bgp_peer_status( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -328,11 +343,11 @@ async def test_begin_get_bgp_peer_status(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_supported_vpn_devices(self, resource_group): + async def test_virtual_network_gateways_supported_vpn_devices(self, resource_group): response = await self.client.virtual_network_gateways.supported_vpn_devices( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -340,12 +355,12 @@ async def test_supported_vpn_devices(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_learned_routes(self, resource_group): + async def test_virtual_network_gateways_begin_get_learned_routes(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_learned_routes( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -354,13 +369,13 @@ async def test_begin_get_learned_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_advertised_routes(self, resource_group): + async def test_virtual_network_gateways_begin_get_advertised_routes(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_advertised_routes( resource_group_name=resource_group.name, virtual_network_gateway_name="str", peer="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -369,7 +384,7 @@ async def test_begin_get_advertised_routes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): + async def test_virtual_network_gateways_begin_set_vpnclient_ipsec_parameters(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_set_vpnclient_ipsec_parameters( resource_group_name=resource_group.name, @@ -384,7 +399,7 @@ async def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): "saDataSizeKilobytes": 0, "saLifeTimeSeconds": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -393,12 +408,12 @@ async def test_begin_set_vpnclient_ipsec_parameters(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_vpnclient_ipsec_parameters(self, resource_group): + async def test_virtual_network_gateways_begin_get_vpnclient_ipsec_parameters(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_vpnclient_ipsec_parameters( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -407,12 +422,12 @@ async def test_begin_get_vpnclient_ipsec_parameters(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_vpn_device_configuration_script(self, resource_group): + async def test_virtual_network_gateways_vpn_device_configuration_script(self, resource_group): response = await self.client.virtual_network_gateways.vpn_device_configuration_script( resource_group_name=resource_group.name, virtual_network_gateway_connection_name="str", parameters={"deviceFamily": "str", "firmwareVersion": "str", "vendor": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -420,12 +435,12 @@ async def test_vpn_device_configuration_script(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_packet_capture(self, resource_group): + async def test_virtual_network_gateways_begin_start_packet_capture(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_start_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -434,13 +449,79 @@ async def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop_packet_capture(self, resource_group): + async def test_virtual_network_gateways_begin_stop_packet_capture(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_stop_packet_capture( resource_group_name=resource_group.name, virtual_network_gateway_name="str", parameters={"sasUrl": "str"}, - api_version="2024-03-01", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_network_gateways_begin_get_failover_all_test_details(self, resource_group): + response = await ( + await self.client.virtual_network_gateways.begin_get_failover_all_test_details( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + type="str", + fetch_latest=bool, + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_network_gateways_begin_get_failover_single_test_details(self, resource_group): + response = await ( + await self.client.virtual_network_gateways.begin_get_failover_single_test_details( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + peering_location="str", + failover_test_id="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_network_gateways_begin_start_express_route_site_failover_simulation(self, resource_group): + response = await ( + await self.client.virtual_network_gateways.begin_start_express_route_site_failover_simulation( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + peering_location="str", + api_version="2024-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_network_gateways_begin_stop_express_route_site_failover_simulation(self, resource_group): + response = await ( + await self.client.virtual_network_gateways.begin_stop_express_route_site_failover_simulation( + resource_group_name=resource_group.name, + virtual_network_gateway_name="str", + stop_parameters={ + "details": [{"failoverConnectionName": "str", "failoverLocation": "str", "isVerified": bool}], + "peeringLocation": "str", + "wasSimulationSuccessful": bool, + }, + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -449,12 +530,12 @@ async def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_vpnclient_connection_health(self, resource_group): + async def test_virtual_network_gateways_begin_get_vpnclient_connection_health(self, resource_group): response = await ( await self.client.virtual_network_gateways.begin_get_vpnclient_connection_health( resource_group_name=resource_group.name, virtual_network_gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -463,13 +544,15 @@ async def test_begin_get_vpnclient_connection_health(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_disconnect_virtual_network_gateway_vpn_connections(self, resource_group): + async def test_virtual_network_gateways_begin_disconnect_virtual_network_gateway_vpn_connections( + self, resource_group + ): response = await ( await self.client.virtual_network_gateways.begin_disconnect_virtual_network_gateway_vpn_connections( resource_group_name=resource_group.name, virtual_network_gateway_name="str", request={"vpnConnectionIds": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations.py index 22d651fd4ab1..a17f79da28c9 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_network_peerings_begin_delete(self, resource_group): response = self.client.virtual_network_peerings.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", virtual_network_peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_network_peerings_get(self, resource_group): response = self.client.virtual_network_peerings.get( resource_group_name=resource_group.name, virtual_network_name="str", virtual_network_peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_network_peerings_begin_create_or_update(self, resource_group): response = self.client.virtual_network_peerings.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_name="str", @@ -59,25 +59,45 @@ def test_begin_create_or_update(self, resource_group): "enableOnlyIPv6Peering": bool, "etag": "str", "id": "str", - "localAddressSpace": {"addressPrefixes": ["str"]}, + "localAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "localSubnetNames": ["str"], - "localVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "name": "str", "peerCompleteVnets": bool, "peeringState": "str", "peeringSyncLevel": "str", "provisioningState": "str", - "remoteAddressSpace": {"addressPrefixes": ["str"]}, + "remoteAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteBgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "remoteSubnetNames": ["str"], "remoteVirtualNetwork": {"id": "str"}, - "remoteVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteVirtualNetworkEncryption": {"enabled": bool, "enforcement": "str"}, "resourceGuid": "str", "type": "str", "useRemoteGateways": bool, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -85,11 +105,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_network_peerings_list(self, resource_group): response = self.client.virtual_network_peerings.list( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations_async.py index c784c0dcfcf1..f3b025ab7a53 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_peerings_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_network_peerings_begin_delete(self, resource_group): response = await ( await self.client.virtual_network_peerings.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", virtual_network_peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_network_peerings_get(self, resource_group): response = await self.client.virtual_network_peerings.get( resource_group_name=resource_group.name, virtual_network_name="str", virtual_network_peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_network_peerings_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_network_peerings.begin_create_or_update( resource_group_name=resource_group.name, @@ -63,25 +63,45 @@ async def test_begin_create_or_update(self, resource_group): "enableOnlyIPv6Peering": bool, "etag": "str", "id": "str", - "localAddressSpace": {"addressPrefixes": ["str"]}, + "localAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "localSubnetNames": ["str"], - "localVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "name": "str", "peerCompleteVnets": bool, "peeringState": "str", "peeringSyncLevel": "str", "provisioningState": "str", - "remoteAddressSpace": {"addressPrefixes": ["str"]}, + "remoteAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteBgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "remoteSubnetNames": ["str"], "remoteVirtualNetwork": {"id": "str"}, - "remoteVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteVirtualNetworkEncryption": {"enabled": bool, "enforcement": "str"}, "resourceGuid": "str", "type": "str", "useRemoteGateways": bool, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -90,11 +110,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_network_peerings_list(self, resource_group): response = self.client.virtual_network_peerings.list( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations.py index 1f9504950c0f..825aa9c0083b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_network_taps_begin_delete(self, resource_group): response = self.client.virtual_network_taps.begin_delete( resource_group_name=resource_group.name, tap_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_network_taps_get(self, resource_group): response = self.client.virtual_network_taps.get( resource_group_name=resource_group.name, tap_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_network_taps_begin_create_or_update(self, resource_group): response = self.client.virtual_network_taps.begin_create_or_update( resource_group_name=resource_group.name, tap_name="str", @@ -123,6 +123,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -216,6 +219,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -664,6 +668,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1254,6 +1259,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1345,6 +1353,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1842,6 +1851,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2510,6 +2520,9 @@ def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2603,6 +2616,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2960,6 +2974,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3454,6 +3469,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3545,6 +3563,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3958,6 +3977,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4404,7 +4424,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -4412,12 +4432,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_virtual_network_taps_update_tags(self, resource_group): response = self.client.virtual_network_taps.update_tags( resource_group_name=resource_group.name, tap_name="str", tap_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4425,9 +4445,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_virtual_network_taps_list_all(self, resource_group): response = self.client.virtual_network_taps.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -4435,10 +4455,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_virtual_network_taps_list_by_resource_group(self, resource_group): response = self.client.virtual_network_taps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations_async.py index 5f37d5802ca7..4a8b8f05d301 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_network_taps_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_network_taps_begin_delete(self, resource_group): response = await ( await self.client.virtual_network_taps.begin_delete( resource_group_name=resource_group.name, tap_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_network_taps_get(self, resource_group): response = await self.client.virtual_network_taps.get( resource_group_name=resource_group.name, tap_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_network_taps_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_network_taps.begin_create_or_update( resource_group_name=resource_group.name, @@ -127,6 +127,9 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -220,6 +223,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -672,6 +676,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1262,6 +1267,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1355,6 +1363,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1857,6 +1866,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2527,6 +2537,9 @@ async def test_begin_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2620,6 +2633,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2977,6 +2991,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3471,6 +3486,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3564,6 +3582,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3977,6 +3996,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4423,7 +4443,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -4432,12 +4452,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_virtual_network_taps_update_tags(self, resource_group): response = await self.client.virtual_network_taps.update_tags( resource_group_name=resource_group.name, tap_name="str", tap_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -4445,9 +4465,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_virtual_network_taps_list_all(self, resource_group): response = self.client.virtual_network_taps.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -4455,10 +4475,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_virtual_network_taps_list_by_resource_group(self, resource_group): response = self.client.virtual_network_taps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations.py index 133ccafb0bc4..4d31694ce031 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_networks_begin_delete(self, resource_group): response = self.client.virtual_networks.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_networks_get(self, resource_group): response = self.client.virtual_networks.get( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,12 +44,17 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_networks_begin_create_or_update(self, resource_group): response = self.client.virtual_networks.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_name="str", parameters={ - "addressSpace": {"addressPrefixes": ["str"]}, + "addressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "bgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "ddosProtectionPlan": {"id": "str"}, "dhcpOptions": {"dnsServers": ["str"]}, @@ -196,6 +201,9 @@ def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -287,6 +295,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1218,6 +1227,7 @@ def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2180,19 +2190,39 @@ def test_begin_create_or_update(self, resource_group): "enableOnlyIPv6Peering": bool, "etag": "str", "id": "str", - "localAddressSpace": {"addressPrefixes": ["str"]}, + "localAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "localSubnetNames": ["str"], - "localVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "name": "str", "peerCompleteVnets": bool, "peeringState": "str", "peeringSyncLevel": "str", "provisioningState": "str", - "remoteAddressSpace": {"addressPrefixes": ["str"]}, + "remoteAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteBgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "remoteSubnetNames": ["str"], "remoteVirtualNetwork": {"id": "str"}, - "remoteVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteVirtualNetworkEncryption": {"enabled": bool, "enforcement": "str"}, "resourceGuid": "str", "type": "str", @@ -2200,7 +2230,7 @@ def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -2208,12 +2238,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_virtual_networks_update_tags(self, resource_group): response = self.client.virtual_networks.update_tags( resource_group_name=resource_group.name, virtual_network_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2221,9 +2251,9 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_virtual_networks_list_all(self, resource_group): response = self.client.virtual_networks.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -2231,10 +2261,10 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_networks_list(self, resource_group): response = self.client.virtual_networks.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -2242,12 +2272,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_ip_address_availability(self, resource_group): + def test_virtual_networks_check_ip_address_availability(self, resource_group): response = self.client.virtual_networks.check_ip_address_availability( resource_group_name=resource_group.name, virtual_network_name="str", ip_address="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2255,11 +2285,11 @@ def test_check_ip_address_availability(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_usage(self, resource_group): + def test_virtual_networks_list_usage(self, resource_group): response = self.client.virtual_networks.list_usage( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -2267,11 +2297,11 @@ def test_list_usage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list_ddos_protection_status(self, resource_group): + def test_virtual_networks_begin_list_ddos_protection_status(self, resource_group): response = self.client.virtual_networks.begin_list_ddos_protection_status( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations_async.py index 3bb316242e1f..0e951ea8297b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_networks_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_networks_begin_delete(self, resource_group): response = await ( await self.client.virtual_networks.begin_delete( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_networks_get(self, resource_group): response = await self.client.virtual_networks.get( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,13 +47,18 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_networks_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_networks.begin_create_or_update( resource_group_name=resource_group.name, virtual_network_name="str", parameters={ - "addressSpace": {"addressPrefixes": ["str"]}, + "addressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "bgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "ddosProtectionPlan": {"id": "str"}, "dhcpOptions": {"dnsServers": ["str"]}, @@ -200,6 +205,9 @@ async def test_begin_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -293,6 +301,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1233,6 +1242,7 @@ async def test_begin_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2197,19 +2207,39 @@ async def test_begin_create_or_update(self, resource_group): "enableOnlyIPv6Peering": bool, "etag": "str", "id": "str", - "localAddressSpace": {"addressPrefixes": ["str"]}, + "localAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "localSubnetNames": ["str"], - "localVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "localVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "name": "str", "peerCompleteVnets": bool, "peeringState": "str", "peeringSyncLevel": "str", "provisioningState": "str", - "remoteAddressSpace": {"addressPrefixes": ["str"]}, + "remoteAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteBgpCommunities": {"virtualNetworkCommunity": "str", "regionalCommunity": "str"}, "remoteSubnetNames": ["str"], "remoteVirtualNetwork": {"id": "str"}, - "remoteVirtualNetworkAddressSpace": {"addressPrefixes": ["str"]}, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "remoteVirtualNetworkEncryption": {"enabled": bool, "enforcement": "str"}, "resourceGuid": "str", "type": "str", @@ -2217,7 +2247,7 @@ async def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -2226,12 +2256,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_virtual_networks_update_tags(self, resource_group): response = await self.client.virtual_networks.update_tags( resource_group_name=resource_group.name, virtual_network_name="str", parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2239,9 +2269,9 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_virtual_networks_list_all(self, resource_group): response = self.client.virtual_networks.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -2249,10 +2279,10 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_networks_list(self, resource_group): response = self.client.virtual_networks.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -2260,12 +2290,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_ip_address_availability(self, resource_group): + async def test_virtual_networks_check_ip_address_availability(self, resource_group): response = await self.client.virtual_networks.check_ip_address_availability( resource_group_name=resource_group.name, virtual_network_name="str", ip_address="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -2273,11 +2303,11 @@ async def test_check_ip_address_availability(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_usage(self, resource_group): + async def test_virtual_networks_list_usage(self, resource_group): response = self.client.virtual_networks.list_usage( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -2285,12 +2315,12 @@ async def test_list_usage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list_ddos_protection_status(self, resource_group): + async def test_virtual_networks_begin_list_ddos_protection_status(self, resource_group): response = await ( await self.client.virtual_networks.begin_list_ddos_protection_status( resource_group_name=resource_group.name, virtual_network_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result result = [r async for r in response] diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations.py index 41926cae8acb..dd83c89cb6ce 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_router_peerings_begin_delete(self, resource_group): response = self.client.virtual_router_peerings.begin_delete( resource_group_name=resource_group.name, virtual_router_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -33,12 +33,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_router_peerings_get(self, resource_group): response = self.client.virtual_router_peerings.get( resource_group_name=resource_group.name, virtual_router_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_router_peerings_begin_create_or_update(self, resource_group): response = self.client.virtual_router_peerings.begin_create_or_update( resource_group_name=resource_group.name, virtual_router_name="str", @@ -60,7 +60,7 @@ def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -68,11 +68,11 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_router_peerings_list(self, resource_group): response = self.client.virtual_router_peerings.list( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations_async.py index 60721e88b35a..93022b5f3a30 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_router_peerings_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_router_peerings_begin_delete(self, resource_group): response = await ( await self.client.virtual_router_peerings.begin_delete( resource_group_name=resource_group.name, virtual_router_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -36,12 +36,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_router_peerings_get(self, resource_group): response = await self.client.virtual_router_peerings.get( resource_group_name=resource_group.name, virtual_router_name="str", peering_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_router_peerings_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_router_peerings.begin_create_or_update( resource_group_name=resource_group.name, @@ -64,7 +64,7 @@ async def test_begin_create_or_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -73,11 +73,11 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_router_peerings_list(self, resource_group): response = self.client.virtual_router_peerings.list( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations.py index 261142b7d5a9..3a0e1b92ba7d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_routers_begin_delete(self, resource_group): response = self.client.virtual_routers.begin_delete( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -32,11 +32,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_routers_get(self, resource_group): response = self.client.virtual_routers.get( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_routers_begin_create_or_update(self, resource_group): response = self.client.virtual_routers.begin_create_or_update( resource_group_name=resource_group.name, virtual_router_name="str", @@ -62,7 +62,7 @@ def test_begin_create_or_update(self, resource_group): "virtualRouterAsn": 0, "virtualRouterIps": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -70,10 +70,10 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_virtual_routers_list_by_resource_group(self, resource_group): response = self.client.virtual_routers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -81,9 +81,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_routers_list(self, resource_group): response = self.client.virtual_routers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations_async.py index 7c2a00697596..5267644ad343 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_routers_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_routers_begin_delete(self, resource_group): response = await ( await self.client.virtual_routers.begin_delete( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -35,11 +35,11 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_routers_get(self, resource_group): response = await self.client.virtual_routers.get( resource_group_name=resource_group.name, virtual_router_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_routers_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_routers.begin_create_or_update( resource_group_name=resource_group.name, @@ -66,7 +66,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualRouterAsn": 0, "virtualRouterIps": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -75,10 +75,10 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_virtual_routers_list_by_resource_group(self, resource_group): response = self.client.virtual_routers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -86,9 +86,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_routers_list(self, resource_group): response = self.client.virtual_routers.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations.py index 8468d097ae74..b087b2b939fa 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_wans_get(self, resource_group): response = self.client.virtual_wans.get( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_wans_begin_create_or_update(self, resource_group): response = self.client.virtual_wans.begin_create_or_update( resource_group_name=resource_group.name, virtual_wan_name="str", @@ -51,7 +51,7 @@ def test_begin_create_or_update(self, resource_group): "virtualHubs": [{"id": "str"}], "vpnSites": [{"id": "str"}], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -59,12 +59,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_virtual_wans_update_tags(self, resource_group): response = self.client.virtual_wans.update_tags( resource_group_name=resource_group.name, virtual_wan_name="str", wan_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -72,11 +72,11 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_wans_begin_delete(self, resource_group): response = self.client.virtual_wans.begin_delete( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -84,10 +84,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_virtual_wans_list_by_resource_group(self, resource_group): response = self.client.virtual_wans.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -95,9 +95,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_wans_list(self, resource_group): response = self.client.virtual_wans.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations_async.py index 9afac556f20d..ce8bdf6a8f28 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_virtual_wans_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_wans_get(self, resource_group): response = await self.client.virtual_wans.get( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_wans_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_wans.begin_create_or_update( resource_group_name=resource_group.name, @@ -53,7 +53,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualHubs": [{"id": "str"}], "vpnSites": [{"id": "str"}], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -62,12 +62,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_virtual_wans_update_tags(self, resource_group): response = await self.client.virtual_wans.update_tags( resource_group_name=resource_group.name, virtual_wan_name="str", wan_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -75,12 +75,12 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_wans_begin_delete(self, resource_group): response = await ( await self.client.virtual_wans.begin_delete( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -89,10 +89,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_virtual_wans_list_by_resource_group(self, resource_group): response = self.client.virtual_wans.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -100,9 +100,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_wans_list(self, resource_group): response = self.client.virtual_wans.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations.py index 6486d286b71f..3031dafeb96f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_connections_get(self, resource_group): response = self.client.vpn_connections.get( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_vpn_connections_begin_create_or_update(self, resource_group): response = self.client.vpn_connections.begin_create_or_update( resource_group_name=resource_group.name, gateway_name="str", @@ -120,7 +120,7 @@ def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -128,12 +128,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_vpn_connections_begin_delete(self, resource_group): response = self.client.vpn_connections.begin_delete( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -141,12 +141,12 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_packet_capture(self, resource_group): + def test_vpn_connections_begin_start_packet_capture(self, resource_group): response = self.client.vpn_connections.begin_start_packet_capture( resource_group_name=resource_group.name, gateway_name="str", vpn_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -154,12 +154,12 @@ def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop_packet_capture(self, resource_group): + def test_vpn_connections_begin_stop_packet_capture(self, resource_group): response = self.client.vpn_connections.begin_stop_packet_capture( resource_group_name=resource_group.name, gateway_name="str", vpn_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -167,11 +167,11 @@ def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_vpn_gateway(self, resource_group): + def test_vpn_connections_list_by_vpn_gateway(self, resource_group): response = self.client.vpn_connections.list_by_vpn_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations_async.py index bba136c5c859..dbb3c443fc9d 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_connections_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_connections_get(self, resource_group): response = await self.client.vpn_connections.get( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_vpn_connections_begin_create_or_update(self, resource_group): response = await ( await self.client.vpn_connections.begin_create_or_update( resource_group_name=resource_group.name, @@ -125,7 +125,7 @@ async def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -134,13 +134,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_vpn_connections_begin_delete(self, resource_group): response = await ( await self.client.vpn_connections.begin_delete( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -149,13 +149,13 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_packet_capture(self, resource_group): + async def test_vpn_connections_begin_start_packet_capture(self, resource_group): response = await ( await self.client.vpn_connections.begin_start_packet_capture( resource_group_name=resource_group.name, gateway_name="str", vpn_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -164,13 +164,13 @@ async def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop_packet_capture(self, resource_group): + async def test_vpn_connections_begin_stop_packet_capture(self, resource_group): response = await ( await self.client.vpn_connections.begin_stop_packet_capture( resource_group_name=resource_group.name, gateway_name="str", vpn_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -179,11 +179,11 @@ async def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_vpn_gateway(self, resource_group): + async def test_vpn_connections_list_by_vpn_gateway(self, resource_group): response = self.client.vpn_connections.list_by_vpn_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations.py index cb46e451d24e..c48188e34e81 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_gateways_get(self, resource_group): response = self.client.vpn_gateways.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_vpn_gateways_begin_create_or_update(self, resource_group): response = self.client.vpn_gateways.begin_create_or_update( resource_group_name=resource_group.name, gateway_name="str", @@ -169,7 +169,7 @@ def test_begin_create_or_update(self, resource_group): "virtualHub": {"id": "str"}, "vpnGatewayScaleUnit": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -177,12 +177,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_tags(self, resource_group): + def test_vpn_gateways_begin_update_tags(self, resource_group): response = self.client.vpn_gateways.begin_update_tags( resource_group_name=resource_group.name, gateway_name="str", vpn_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -190,11 +190,11 @@ def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_vpn_gateways_begin_delete(self, resource_group): response = self.client.vpn_gateways.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -202,11 +202,11 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset(self, resource_group): + def test_vpn_gateways_begin_reset(self, resource_group): response = self.client.vpn_gateways.begin_reset( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -214,11 +214,11 @@ def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_packet_capture(self, resource_group): + def test_vpn_gateways_begin_start_packet_capture(self, resource_group): response = self.client.vpn_gateways.begin_start_packet_capture( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -226,11 +226,11 @@ def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_stop_packet_capture(self, resource_group): + def test_vpn_gateways_begin_stop_packet_capture(self, resource_group): response = self.client.vpn_gateways.begin_stop_packet_capture( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -238,10 +238,10 @@ def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_vpn_gateways_list_by_resource_group(self, resource_group): response = self.client.vpn_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -249,9 +249,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_vpn_gateways_list(self, resource_group): response = self.client.vpn_gateways.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations_async.py index 2afc37ac5167..6c17e5032b31 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_gateways_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_gateways_get(self, resource_group): response = await self.client.vpn_gateways.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_vpn_gateways_begin_create_or_update(self, resource_group): response = await ( await self.client.vpn_gateways.begin_create_or_update( resource_group_name=resource_group.name, @@ -173,7 +173,7 @@ async def test_begin_create_or_update(self, resource_group): "virtualHub": {"id": "str"}, "vpnGatewayScaleUnit": 0, }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -182,13 +182,13 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_tags(self, resource_group): + async def test_vpn_gateways_begin_update_tags(self, resource_group): response = await ( await self.client.vpn_gateways.begin_update_tags( resource_group_name=resource_group.name, gateway_name="str", vpn_gateway_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -197,12 +197,12 @@ async def test_begin_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_vpn_gateways_begin_delete(self, resource_group): response = await ( await self.client.vpn_gateways.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -211,12 +211,12 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset(self, resource_group): + async def test_vpn_gateways_begin_reset(self, resource_group): response = await ( await self.client.vpn_gateways.begin_reset( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -225,12 +225,12 @@ async def test_begin_reset(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_packet_capture(self, resource_group): + async def test_vpn_gateways_begin_start_packet_capture(self, resource_group): response = await ( await self.client.vpn_gateways.begin_start_packet_capture( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -239,12 +239,12 @@ async def test_begin_start_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_stop_packet_capture(self, resource_group): + async def test_vpn_gateways_begin_stop_packet_capture(self, resource_group): response = await ( await self.client.vpn_gateways.begin_stop_packet_capture( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -253,10 +253,10 @@ async def test_begin_stop_packet_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_vpn_gateways_list_by_resource_group(self, resource_group): response = self.client.vpn_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -264,9 +264,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_vpn_gateways_list(self, resource_group): response = self.client.vpn_gateways.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations.py index 93582b8758b0..14195f9ca7bd 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reset_connection(self, resource_group): + def test_vpn_link_connections_begin_reset_connection(self, resource_group): response = self.client.vpn_link_connections.begin_reset_connection( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -34,13 +34,13 @@ def test_begin_reset_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_all_shared_keys(self, resource_group): + def test_vpn_link_connections_get_all_shared_keys(self, resource_group): response = self.client.vpn_link_connections.get_all_shared_keys( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -48,13 +48,13 @@ def test_get_all_shared_keys(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_default_shared_key(self, resource_group): + def test_vpn_link_connections_get_default_shared_key(self, resource_group): response = self.client.vpn_link_connections.get_default_shared_key( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -62,7 +62,7 @@ def test_get_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_set_or_init_default_shared_key(self, resource_group): + def test_vpn_link_connections_begin_set_or_init_default_shared_key(self, resource_group): response = self.client.vpn_link_connections.begin_set_or_init_default_shared_key( resource_group_name=resource_group.name, gateway_name="str", @@ -74,7 +74,7 @@ def test_begin_set_or_init_default_shared_key(self, resource_group): "properties": {"provisioningState": "str", "sharedKey": "str", "sharedKeyLength": 0}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,13 +82,13 @@ def test_begin_set_or_init_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_default_shared_key(self, resource_group): + def test_vpn_link_connections_list_default_shared_key(self, resource_group): response = self.client.vpn_link_connections.list_default_shared_key( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -96,13 +96,13 @@ def test_list_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_get_ike_sas(self, resource_group): + def test_vpn_link_connections_begin_get_ike_sas(self, resource_group): response = self.client.vpn_link_connections.begin_get_ike_sas( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -110,12 +110,12 @@ def test_begin_get_ike_sas(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_vpn_connection(self, resource_group): + def test_vpn_link_connections_list_by_vpn_connection(self, resource_group): response = self.client.vpn_link_connections.list_by_vpn_connection( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations_async.py index 01339b6d21d0..bc06f2322df1 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_link_connections_operations_async.py @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reset_connection(self, resource_group): + async def test_vpn_link_connections_begin_reset_connection(self, resource_group): response = await ( await self.client.vpn_link_connections.begin_reset_connection( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -37,13 +37,13 @@ async def test_begin_reset_connection(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_all_shared_keys(self, resource_group): + async def test_vpn_link_connections_get_all_shared_keys(self, resource_group): response = self.client.vpn_link_connections.get_all_shared_keys( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -51,13 +51,13 @@ async def test_get_all_shared_keys(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_default_shared_key(self, resource_group): + async def test_vpn_link_connections_get_default_shared_key(self, resource_group): response = await self.client.vpn_link_connections.get_default_shared_key( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_get_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_set_or_init_default_shared_key(self, resource_group): + async def test_vpn_link_connections_begin_set_or_init_default_shared_key(self, resource_group): response = await ( await self.client.vpn_link_connections.begin_set_or_init_default_shared_key( resource_group_name=resource_group.name, @@ -78,7 +78,7 @@ async def test_begin_set_or_init_default_shared_key(self, resource_group): "properties": {"provisioningState": "str", "sharedKey": "str", "sharedKeyLength": 0}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -87,13 +87,13 @@ async def test_begin_set_or_init_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_default_shared_key(self, resource_group): + async def test_vpn_link_connections_list_default_shared_key(self, resource_group): response = await self.client.vpn_link_connections.list_default_shared_key( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -101,14 +101,14 @@ async def test_list_default_shared_key(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_get_ike_sas(self, resource_group): + async def test_vpn_link_connections_begin_get_ike_sas(self, resource_group): response = await ( await self.client.vpn_link_connections.begin_get_ike_sas( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -117,12 +117,12 @@ async def test_begin_get_ike_sas(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_vpn_connection(self, resource_group): + async def test_vpn_link_connections_list_by_vpn_connection(self, resource_group): response = self.client.vpn_link_connections.list_by_vpn_connection( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations.py index 525814785cb4..ba5f133ae90f 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_list(self, resource_group): + def test_vpn_server_configurations_associated_with_virtual_wan_begin_list(self, resource_group): response = self.client.vpn_server_configurations_associated_with_virtual_wan.begin_list( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations_async.py index 249b3acaf4bf..1e8d53f7f7e8 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_associated_with_virtual_wan_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_list(self, resource_group): + async def test_vpn_server_configurations_associated_with_virtual_wan_begin_list(self, resource_group): response = await ( await self.client.vpn_server_configurations_associated_with_virtual_wan.begin_list( resource_group_name=resource_group.name, virtual_wan_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations.py index f958fbb35c1a..3177f4cb2694 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_server_configurations_get(self, resource_group): response = self.client.vpn_server_configurations.get( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_vpn_server_configurations_begin_create_or_update(self, resource_group): response = self.client.vpn_server_configurations.begin_create_or_update( resource_group_name=resource_group.name, vpn_server_configuration_name="str", @@ -102,7 +102,12 @@ def test_begin_create_or_update(self, resource_group): }, }, }, - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, } ], "provisioningState": "str", @@ -144,7 +149,7 @@ def test_begin_create_or_update(self, resource_group): "vpnClientRootCertificates": [{"name": "str", "publicCertData": "str"}], "vpnProtocols": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -152,12 +157,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_vpn_server_configurations_update_tags(self, resource_group): response = self.client.vpn_server_configurations.update_tags( resource_group_name=resource_group.name, vpn_server_configuration_name="str", vpn_server_configuration_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -165,11 +170,11 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_vpn_server_configurations_begin_delete(self, resource_group): response = self.client.vpn_server_configurations.begin_delete( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -177,10 +182,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_vpn_server_configurations_list_by_resource_group(self, resource_group): response = self.client.vpn_server_configurations.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -188,9 +193,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_vpn_server_configurations_list(self, resource_group): response = self.client.vpn_server_configurations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations_async.py index dd5415a2bc99..e436a8883b52 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_server_configurations_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_server_configurations_get(self, resource_group): response = await self.client.vpn_server_configurations.get( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_vpn_server_configurations_begin_create_or_update(self, resource_group): response = await ( await self.client.vpn_server_configurations.begin_create_or_update( resource_group_name=resource_group.name, @@ -104,7 +104,16 @@ async def test_begin_create_or_update(self, resource_group): }, }, }, - "vpnClientAddressPool": {"addressPrefixes": ["str"]}, + "vpnClientAddressPool": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], + }, } ], "provisioningState": "str", @@ -148,7 +157,7 @@ async def test_begin_create_or_update(self, resource_group): "vpnClientRootCertificates": [{"name": "str", "publicCertData": "str"}], "vpnProtocols": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -157,12 +166,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_vpn_server_configurations_update_tags(self, resource_group): response = await self.client.vpn_server_configurations.update_tags( resource_group_name=resource_group.name, vpn_server_configuration_name="str", vpn_server_configuration_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -170,12 +179,12 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_vpn_server_configurations_begin_delete(self, resource_group): response = await ( await self.client.vpn_server_configurations.begin_delete( resource_group_name=resource_group.name, vpn_server_configuration_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -184,10 +193,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_vpn_server_configurations_list_by_resource_group(self, resource_group): response = self.client.vpn_server_configurations.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -195,9 +204,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_vpn_server_configurations_list(self, resource_group): response = self.client.vpn_server_configurations.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations.py index a23622c67760..a00be90469ab 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations.py @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_site_link_connections_get(self, resource_group): response = self.client.vpn_site_link_connections.get( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations_async.py index 0bbd19d42215..03123504f790 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_link_connections_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_site_link_connections_get(self, resource_group): response = await self.client.vpn_site_link_connections.get( resource_group_name=resource_group.name, gateway_name="str", connection_name="str", link_connection_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations.py index fc0b7c3b1117..8d6b938181e3 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_site_links_get(self, resource_group): response = self.client.vpn_site_links.get( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_link_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,11 +33,11 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_vpn_site(self, resource_group): + def test_vpn_site_links_list_by_vpn_site(self, resource_group): response = self.client.vpn_site_links.list_by_vpn_site( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations_async.py index 62e9293867d1..12ca81c9fc35 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_site_links_operations_async.py @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_site_links_get(self, resource_group): response = await self.client.vpn_site_links.get( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_link_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -34,11 +34,11 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_vpn_site(self, resource_group): + async def test_vpn_site_links_list_by_vpn_site(self, resource_group): response = self.client.vpn_site_links.list_by_vpn_site( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations.py index aa12a8ad8cec..a7d9fa6bc78b 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations.py @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download(self, resource_group): + def test_vpn_sites_configuration_begin_download(self, resource_group): response = self.client.vpn_sites_configuration.begin_download( resource_group_name=resource_group.name, virtual_wan_name="str", request={"outputBlobSasUrl": "str", "vpnSites": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations_async.py index f263717c7d2b..ec77e3352693 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_configuration_operations_async.py @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download(self, resource_group): + async def test_vpn_sites_configuration_begin_download(self, resource_group): response = await ( await self.client.vpn_sites_configuration.begin_download( resource_group_name=resource_group.name, virtual_wan_name="str", request={"outputBlobSasUrl": "str", "vpnSites": ["str"]}, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations.py index 29229315350a..c91f60e599e5 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations.py @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_vpn_sites_get(self, resource_group): response = self.client.vpn_sites.get( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,12 +32,17 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_vpn_sites_begin_create_or_update(self, resource_group): response = self.client.vpn_sites.begin_create_or_update( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_parameters={ - "addressSpace": {"addressPrefixes": ["str"]}, + "addressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "bgpProperties": { "asn": 0, "bgpPeeringAddress": "str", @@ -78,7 +83,7 @@ def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -86,12 +91,12 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_vpn_sites_update_tags(self, resource_group): response = self.client.vpn_sites.update_tags( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -99,11 +104,11 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_vpn_sites_begin_delete(self, resource_group): response = self.client.vpn_sites.begin_delete( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,10 +116,10 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_vpn_sites_list_by_resource_group(self, resource_group): response = self.client.vpn_sites.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -122,9 +127,9 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_vpn_sites_list(self, resource_group): response = self.client.vpn_sites.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations_async.py index 509d69b18fc4..6c4ac7cd2545 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_vpn_sites_operations_async.py @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_vpn_sites_get(self, resource_group): response = await self.client.vpn_sites.get( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -33,13 +33,18 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_vpn_sites_begin_create_or_update(self, resource_group): response = await ( await self.client.vpn_sites.begin_create_or_update( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_parameters={ - "addressSpace": {"addressPrefixes": ["str"]}, + "addressSpace": { + "addressPrefixes": ["str"], + "ipamPoolPrefixAllocations": [ + {"allocatedAddressPrefixes": ["str"], "id": "str", "numberOfIpAddresses": "str"} + ], + }, "bgpProperties": { "asn": 0, "bgpPeeringAddress": "str", @@ -80,7 +85,7 @@ async def test_begin_create_or_update(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -89,12 +94,12 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_vpn_sites_update_tags(self, resource_group): response = await self.client.vpn_sites.update_tags( resource_group_name=resource_group.name, vpn_site_name="str", vpn_site_parameters={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -102,12 +107,12 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_vpn_sites_begin_delete(self, resource_group): response = await ( await self.client.vpn_sites.begin_delete( resource_group_name=resource_group.name, vpn_site_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -116,10 +121,10 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_vpn_sites_list_by_resource_group(self, resource_group): response = self.client.vpn_sites.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -127,9 +132,9 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_vpn_sites_list(self, resource_group): response = self.client.vpn_sites.list( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations.py index d0212089e557..b8b37ee82949 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_web_application_firewall_policies_list(self, resource_group): response = self.client.web_application_firewall_policies.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -31,9 +31,9 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_web_application_firewall_policies_list_all(self, resource_group): response = self.client.web_application_firewall_policies.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,11 +41,11 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_web_application_firewall_policies_get(self, resource_group): response = self.client.web_application_firewall_policies.get( resource_group_name=resource_group.name, policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_web_application_firewall_policies_create_or_update(self, resource_group): response = self.client.web_application_firewall_policies.create_or_update( resource_group_name=resource_group.name, policy_name="str", @@ -228,6 +228,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -321,6 +328,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -719,6 +727,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1262,6 +1271,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1355,6 +1371,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1872,6 +1889,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2482,6 +2500,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2581,6 +2606,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2953,6 +2979,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3472,6 +3499,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3568,6 +3602,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3921,6 +3956,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4522,6 +4558,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4707,6 +4744,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5080,6 +5124,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5398,6 +5449,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5796,6 +5854,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6306,6 +6371,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6530,6 +6602,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6852,6 +6931,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7231,6 +7317,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7589,6 +7682,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7977,6 +8077,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8394,6 +8501,13 @@ def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8781,6 +8895,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9161,6 +9282,13 @@ def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9254,6 +9382,7 @@ def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10471,7 +10600,7 @@ def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10479,11 +10608,11 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_web_application_firewall_policies_begin_delete(self, resource_group): response = self.client.web_application_firewall_policies.begin_delete( resource_group_name=resource_group.name, policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations_async.py index 24707c2d3b50..bc2c74b3b808 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_application_firewall_policies_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_web_application_firewall_policies_list(self, resource_group): response = self.client.web_application_firewall_policies.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -32,9 +32,9 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_web_application_firewall_policies_list_all(self, resource_group): response = self.client.web_application_firewall_policies.list_all( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,11 +42,11 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_web_application_firewall_policies_get(self, resource_group): response = await self.client.web_application_firewall_policies.get( resource_group_name=resource_group.name, policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_web_application_firewall_policies_create_or_update(self, resource_group): response = await self.client.web_application_firewall_policies.create_or_update( resource_group_name=resource_group.name, policy_name="str", @@ -229,6 +229,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -322,6 +329,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -720,6 +728,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1263,6 +1272,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -1356,6 +1372,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -1873,6 +1890,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2483,6 +2501,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -2582,6 +2607,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -2954,6 +2980,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3473,6 +3500,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -3569,6 +3603,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -3922,6 +3957,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4523,6 +4559,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -4708,6 +4745,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5081,6 +5125,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5399,6 +5450,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -5797,6 +5855,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6307,6 +6372,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": ..., @@ -6531,6 +6603,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -6853,6 +6932,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7232,6 +7318,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7590,6 +7683,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -7978,6 +8078,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8395,6 +8502,13 @@ async def test_create_or_update(self, resource_group): } ], "ipConfigurations": [...], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -8782,6 +8896,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9162,6 +9283,13 @@ async def test_create_or_update(self, resource_group): "subnet": ..., } ], + "ipamPoolPrefixAllocations": [ + { + "allocatedAddressPrefixes": ["str"], + "id": "str", + "numberOfIpAddresses": "str", + } + ], "name": "str", "natGateway": {"id": "str"}, "networkSecurityGroup": { @@ -9255,6 +9383,7 @@ async def test_create_or_update(self, resource_group): { "auxiliaryMode": "str", "auxiliarySku": "str", + "defaultOutboundConnectivityEnabled": bool, "disableTcpStateTracking": bool, "dnsSettings": { "appliedDnsServers": ["str"], @@ -10472,7 +10601,7 @@ async def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -10480,12 +10609,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_web_application_firewall_policies_begin_delete(self, resource_group): response = await ( await self.client.web_application_firewall_policies.begin_delete( resource_group_name=resource_group.name, policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations.py index 79212e5594e3..80634d4815d0 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations.py @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_web_categories_get(self, resource_group): response = self.client.web_categories.get( name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -31,9 +31,9 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_web_categories_list_by_subscription(self, resource_group): response = self.client.web_categories.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations_async.py b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations_async.py index 2466b9d5fedf..baf012f81a25 100644 --- a/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations_async.py +++ b/sdk/network/azure-mgmt-network/generated_tests/test_network_management_web_categories_operations_async.py @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_web_categories_get(self, resource_group): response = await self.client.web_categories.get( name="str", - api_version="2024-03-01", + api_version="2024-05-01", ) # please add some check logic here by yourself @@ -32,9 +32,9 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_web_categories_list_by_subscription(self, resource_group): response = self.client.web_categories.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/network/azure-mgmt-network/setup.py b/sdk/network/azure-mgmt-network/setup.py index ec49aea52337..b8ee4cba69a5 100644 --- a/sdk/network/azure-mgmt-network/setup.py +++ b/sdk/network/azure-mgmt-network/setup.py @@ -22,11 +22,9 @@ # Version extraction inspired from 'requests' with open( - ( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py") - ), + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py"), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_available.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_available_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_available.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_available_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_base.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_base_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_base.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_base_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_policy.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_policy_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_policy.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_policy_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_firewall.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_firewall_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_firewall.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_firewall_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_load_balancer.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_load_balancer_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_load_balancer.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_load_balancer_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_nat.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_nat_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_nat.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_nat_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_operation.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_operation_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_operation.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_operation_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_filter.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_filter_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_filter.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_filter_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_table.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_table_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_table.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_route_table_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_wan_hub.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_wan_hub_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_wan_hub.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_wan_hub_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher_test.py similarity index 99% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher_test.py index 7496b3495385..409f2c9438bd 100644 --- a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py +++ b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher_test.py @@ -42,9 +42,7 @@ class TestMgmtNetwork(AzureMgmtRecordedTestCase): def setup_method(self, method): self.mgmt_client = self.create_mgmt_client(azure.mgmt.network.NetworkManagementClient) - self.mgmt_client_v190601 = self.create_mgmt_client( - azure.mgmt.network.NetworkManagementClient, api_version="2019-06-01" - ) + self.mgmt_client_v190601 = self.create_mgmt_client(azure.mgmt.network.NetworkManagementClient, "2019-06-01") if self.is_live: from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_web_application_firewall_policy.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_web_application_firewall_policy_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_web_application_firewall_policy.py rename to sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_web_application_firewall_policy_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_mixin_operation.py b/sdk/network/azure-mgmt-network/tests/test_mixin_operation_test.py similarity index 100% rename from sdk/network/azure-mgmt-network/tests/test_mixin_operation.py rename to sdk/network/azure-mgmt-network/tests/test_mixin_operation_test.py diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_async_test.py new file mode 100644 index 000000000000..964995e502eb --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementBastionHostsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bastion_hosts_list(self, resource_group): + response = self.client.bastion_hosts.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bastion_hosts_list_by_resource_group(self, resource_group): + response = self.client.bastion_hosts.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_test.py new file mode 100644 index 000000000000..5588ca6341df --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_bastion_hosts_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementBastionHostsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bastion_hosts_list(self, resource_group): + response = self.client.bastion_hosts.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bastion_hosts_list_by_resource_group(self, resource_group): + response = self.client.bastion_hosts.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_async_test.py new file mode 100644 index 000000000000..9c52ab382721 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementBgpServiceCommunitiesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bgp_service_communities_list(self, resource_group): + response = self.client.bgp_service_communities.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_test.py new file mode 100644 index 000000000000..ff4dd1c2d188 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_bgp_service_communities_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementBgpServiceCommunitiesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bgp_service_communities_list(self, resource_group): + response = self.client.bgp_service_communities.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_async_test.py new file mode 100644 index 000000000000..286195045e2d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementDdosProtectionPlansOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ddos_protection_plans_list(self, resource_group): + response = self.client.ddos_protection_plans.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ddos_protection_plans_list_by_resource_group(self, resource_group): + response = self.client.ddos_protection_plans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_test.py new file mode 100644 index 000000000000..b5cd0b6401b1 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ddos_protection_plans_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementDdosProtectionPlansOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ddos_protection_plans_list(self, resource_group): + response = self.client.ddos_protection_plans.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ddos_protection_plans_list_by_resource_group(self, resource_group): + response = self.client.ddos_protection_plans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_async_test.py new file mode 100644 index 000000000000..fda8dcb157f5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRoutePortsLocationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_express_route_ports_locations_list(self, resource_group): + response = self.client.express_route_ports_locations.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_test.py new file mode 100644 index 000000000000..9f11cecb3aef --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_locations_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRoutePortsLocationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_express_route_ports_locations_list(self, resource_group): + response = self.client.express_route_ports_locations.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_async_test.py new file mode 100644 index 000000000000..19b597f90038 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRoutePortsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_express_route_ports_list_by_resource_group(self, resource_group): + response = self.client.express_route_ports.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_express_route_ports_list(self, resource_group): + response = self.client.express_route_ports.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_test.py new file mode 100644 index 000000000000..e48371c4d765 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_ports_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRoutePortsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_express_route_ports_list_by_resource_group(self, resource_group): + response = self.client.express_route_ports.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_express_route_ports_list(self, resource_group): + response = self.client.express_route_ports.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_async_test.py new file mode 100644 index 000000000000..8058465673dd --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRouteProviderPortsLocationOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_express_route_provider_ports_location_list(self, resource_group): + response = await self.client.express_route_provider_ports_location.list() + + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_test.py new file mode 100644 index 000000000000..1d7a08178ce3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_provider_ports_location_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRouteProviderPortsLocationOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_express_route_provider_ports_location_list(self, resource_group): + response = self.client.express_route_provider_ports_location.list() + + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_async_test.py new file mode 100644 index 000000000000..640dd55bf034 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRouteServiceProvidersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_express_route_service_providers_list(self, resource_group): + response = self.client.express_route_service_providers.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_test.py new file mode 100644 index 000000000000..8415d8e56c48 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_express_route_service_providers_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementExpressRouteServiceProvidersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_express_route_service_providers_list(self, resource_group): + response = self.client.express_route_service_providers.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_async_test.py new file mode 100644 index 000000000000..9f3ca6a9449e --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementIpAllocationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_allocations_list(self, resource_group): + response = self.client.ip_allocations.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_allocations_list_by_resource_group(self, resource_group): + response = self.client.ip_allocations.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_test.py new file mode 100644 index 000000000000..179630447980 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_allocations_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementIpAllocationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_allocations_list(self, resource_group): + response = self.client.ip_allocations.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_allocations_list_by_resource_group(self, resource_group): + response = self.client.ip_allocations.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_async_test.py new file mode 100644 index 000000000000..0de1e9bde869 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementIpGroupsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_groups_list_by_resource_group(self, resource_group): + response = self.client.ip_groups.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_groups_list(self, resource_group): + response = self.client.ip_groups.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_test.py new file mode 100644 index 000000000000..0e0a1d67c01a --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_ip_groups_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementIpGroupsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_groups_list_by_resource_group(self, resource_group): + response = self.client.ip_groups.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_groups_list(self, resource_group): + response = self.client.ip_groups.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_async_test.py new file mode 100644 index 000000000000..fded7b896af5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementNetworkVirtualAppliancesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_virtual_appliances_list_by_resource_group(self, resource_group): + response = self.client.network_virtual_appliances.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_virtual_appliances_list(self, resource_group): + response = self.client.network_virtual_appliances.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_test.py new file mode 100644 index 000000000000..cdb0f1f308ce --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_network_virtual_appliances_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementNetworkVirtualAppliancesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_virtual_appliances_list_by_resource_group(self, resource_group): + response = self.client.network_virtual_appliances.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_virtual_appliances_list(self, resource_group): + response = self.client.network_virtual_appliances.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_async_test.py new file mode 100644 index 000000000000..03581eae5c28 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementP2SVpnGatewaysOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_p2_svpn_gateways_list_by_resource_group(self, resource_group): + response = self.client.p2_svpn_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_p2_svpn_gateways_list(self, resource_group): + response = self.client.p2_svpn_gateways.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_test.py new file mode 100644 index 000000000000..17375e7a819a --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_p2_svpn_gateways_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementP2SVpnGatewaysOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_p2_svpn_gateways_list_by_resource_group(self, resource_group): + response = self.client.p2_svpn_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_p2_svpn_gateways_list(self, resource_group): + response = self.client.p2_svpn_gateways.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_async_test.py new file mode 100644 index 000000000000..d3de381044ca --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementRouteFiltersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_filters_list_by_resource_group(self, resource_group): + response = self.client.route_filters.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_filters_list(self, resource_group): + response = self.client.route_filters.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_test.py new file mode 100644 index 000000000000..03c676445133 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_route_filters_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementRouteFiltersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_filters_list_by_resource_group(self, resource_group): + response = self.client.route_filters.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_filters_list(self, resource_group): + response = self.client.route_filters.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_async_test.py new file mode 100644 index 000000000000..d444735b548d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementSecurityPartnerProvidersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_partner_providers_list_by_resource_group(self, resource_group): + response = self.client.security_partner_providers.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_partner_providers_list(self, resource_group): + response = self.client.security_partner_providers.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_test.py new file mode 100644 index 000000000000..7fd622a9b40d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_security_partner_providers_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementSecurityPartnerProvidersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_partner_providers_list_by_resource_group(self, resource_group): + response = self.client.security_partner_providers.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_partner_providers_list(self, resource_group): + response = self.client.security_partner_providers.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_async_test.py new file mode 100644 index 000000000000..a7e52f8d2c22 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementServiceEndpointPoliciesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_service_endpoint_policies_list(self, resource_group): + response = self.client.service_endpoint_policies.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_service_endpoint_policies_list_by_resource_group(self, resource_group): + response = self.client.service_endpoint_policies.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_test.py new file mode 100644 index 000000000000..c79a69274f9d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_service_endpoint_policies_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementServiceEndpointPoliciesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_service_endpoint_policies_list(self, resource_group): + response = self.client.service_endpoint_policies.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_service_endpoint_policies_list_by_resource_group(self, resource_group): + response = self.client.service_endpoint_policies.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_async_test.py new file mode 100644 index 000000000000..18c3a73eb9b5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementSubscriptionNetworkManagerConnectionsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_subscription_network_manager_connections_list(self, resource_group): + response = self.client.subscription_network_manager_connections.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_test.py new file mode 100644 index 000000000000..766c44854f8d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_subscription_network_manager_connections_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementSubscriptionNetworkManagerConnectionsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_subscription_network_manager_connections_list(self, resource_group): + response = self.client.subscription_network_manager_connections.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_async_test.py new file mode 100644 index 000000000000..0947b3174989 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualApplianceSkusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_appliance_skus_list(self, resource_group): + response = self.client.virtual_appliance_skus.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_test.py new file mode 100644 index 000000000000..2ad00d41a6e6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_appliance_skus_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualApplianceSkusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_appliance_skus_list(self, resource_group): + response = self.client.virtual_appliance_skus.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_async_test.py new file mode 100644 index 000000000000..78e988838052 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualHubsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_hubs_list_by_resource_group(self, resource_group): + response = self.client.virtual_hubs.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_hubs_list(self, resource_group): + response = self.client.virtual_hubs.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_test.py new file mode 100644 index 000000000000..8a133f289e44 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_hubs_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualHubsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_hubs_list_by_resource_group(self, resource_group): + response = self.client.virtual_hubs.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_hubs_list(self, resource_group): + response = self.client.virtual_hubs.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_async_test.py new file mode 100644 index 000000000000..d0a62ef666c7 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualRoutersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_routers_list_by_resource_group(self, resource_group): + response = self.client.virtual_routers.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_routers_list(self, resource_group): + response = self.client.virtual_routers.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_test.py new file mode 100644 index 000000000000..ecc9375bcd8a --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_routers_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualRoutersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_routers_list_by_resource_group(self, resource_group): + response = self.client.virtual_routers.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_routers_list(self, resource_group): + response = self.client.virtual_routers.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_async_test.py new file mode 100644 index 000000000000..bb57423efaae --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualWansOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_wans_list_by_resource_group(self, resource_group): + response = self.client.virtual_wans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_wans_list(self, resource_group): + response = self.client.virtual_wans.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_test.py new file mode 100644 index 000000000000..ecaf3b0cfa3f --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_virtual_wans_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVirtualWansOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_wans_list_by_resource_group(self, resource_group): + response = self.client.virtual_wans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_wans_list(self, resource_group): + response = self.client.virtual_wans.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_async_test.py new file mode 100644 index 000000000000..5121aca19aa4 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnGatewaysOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_gateways_list_by_resource_group(self, resource_group): + response = self.client.vpn_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_gateways_list(self, resource_group): + response = self.client.vpn_gateways.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_test.py new file mode 100644 index 000000000000..2f4624b42679 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_gateways_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnGatewaysOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_gateways_list_by_resource_group(self, resource_group): + response = self.client.vpn_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_gateways_list(self, resource_group): + response = self.client.vpn_gateways.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_async_test.py new file mode 100644 index 000000000000..535cd3f3cd85 --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnServerConfigurationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_server_configurations_list_by_resource_group(self, resource_group): + response = self.client.vpn_server_configurations.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_server_configurations_list(self, resource_group): + response = self.client.vpn_server_configurations.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_test.py new file mode 100644 index 000000000000..c022ab91210c --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_server_configurations_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnServerConfigurationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_server_configurations_list_by_resource_group(self, resource_group): + response = self.client.vpn_server_configurations.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_server_configurations_list(self, resource_group): + response = self.client.vpn_server_configurations.list() + result = [r for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_async_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_async_test.py new file mode 100644 index 000000000000..46da6cf71d9e --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.network.aio import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnSitesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_sites_list_by_resource_group(self, resource_group): + response = self.client.vpn_sites.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vpn_sites_list(self, resource_group): + response = self.client.vpn_sites.list() + result = [r async for r in response] + assert response diff --git a/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_test.py b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_test.py new file mode 100644 index 000000000000..0a7c1a5f8f4d --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/test_network_management_vpn_sites_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.network import NetworkManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestNetworkManagementVpnSitesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NetworkManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_sites_list_by_resource_group(self, resource_group): + response = self.client.vpn_sites.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vpn_sites_list(self, resource_group): + response = self.client.vpn_sites.list() + result = [r for r in response] + assert response