From 69ec3981b879d1104c1293f1345faed2a415413f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 27 Jul 2023 08:25:33 +0000 Subject: [PATCH] CodeGen from PR 25009 in Azure/azure-rest-api-specs Merge 26a951b36321252017950c4d43cce3ed3bab6e46 into c8b7a0090e6cd089110c9ed46ef884ebff32c047 --- sdk/network/azure-mgmt-network/MANIFEST.in | 1 + sdk/network/azure-mgmt-network/_meta.json | 4 +- ...n_gateway_available_request_headers_get.py | 38 --- ..._gateway_available_response_headers_get.py | 38 --- ..._gateway_available_server_variables_get.py | 38 --- ...ation_gateway_available_ssl_options_get.py | 38 --- ...ble_ssl_options_predefined_policies_get.py | 39 ---- ...lable_ssl_options_predefined_policy_get.py | 40 ---- ...ion_gateway_available_waf_rule_sets_get.py | 38 --- .../application_gateway_backend_health_get.py | 41 ---- ...application_gateway_backend_health_test.py | 53 ----- .../application_gateway_create.py | 217 ------------------ .../application_gateway_delete.py | 40 ---- .../application_gateway_get.py | 41 ---- .../application_gateway_list.py | 41 ---- .../application_gateway_list_all.py | 39 ---- ...eway_private_endpoint_connection_delete.py | 41 ---- ...gateway_private_endpoint_connection_get.py | 42 ---- ...ateway_private_endpoint_connection_list.py | 42 ---- ...eway_private_endpoint_connection_update.py | 54 ----- ...tion_gateway_private_link_resource_list.py | 42 ---- .../application_gateway_start.py | 40 ---- .../application_gateway_stop.py | 40 ---- .../application_gateway_update_tags.py | 42 ---- .../application_security_group_create.py | 42 ---- .../application_security_group_delete.py | 40 ---- .../application_security_group_get.py | 41 ---- .../application_security_group_list.py | 41 ---- .../application_security_group_list_all.py | 39 ---- .../application_security_group_update_tags.py | 42 ---- ...auto_approved_private_link_services_get.py | 41 ---- ...rivate_link_services_resource_group_get.py | 42 ---- ...vailable_delegations_resource_group_get.py | 42 ---- .../available_delegations_subscription_get.py | 41 ---- .../available_private_endpoint_types_get.py | 41 ---- ...ivate_endpoint_types_resource_group_get.py | 42 ---- .../available_service_aliases_list.py | 41 ---- ..._service_aliases_list_by_resource_group.py | 42 ---- .../azure_firewall_delete.py | 40 ---- ...firewall_fqdn_tags_list_by_subscription.py | 39 ---- .../generated_samples/azure_firewall_get.py | 41 ---- ...firewall_get_with_additional_properties.py | 41 ---- .../azure_firewall_get_with_ip_groups.py | 41 ---- .../azure_firewall_get_with_mgmt_subnet.py | 41 ---- .../azure_firewall_get_with_zones.py | 41 ---- .../azure_firewall_list_by_resource_group.py | 41 ---- .../azure_firewall_list_by_subscription.py | 39 ---- ...azure_firewall_list_learned_ip_prefixes.py | 41 ---- .../azure_firewall_packet_capture.py | 58 ----- .../generated_samples/azure_firewall_put.py | 139 ----------- .../azure_firewall_put_in_hub.py | 57 ----- ...firewall_put_with_additional_properties.py | 141 ------------ .../azure_firewall_put_with_ip_groups.py | 139 ----------- .../azure_firewall_put_with_mgmt_subnet.py | 150 ------------ .../azure_firewall_put_with_zones.py | 139 ----------- .../azure_firewall_update_tags.py | 42 ---- ...ure_web_categories_list_by_subscription.py | 39 ---- .../azure_web_category_get.py | 40 ---- .../generated_samples/bastion_host_delete.py | 40 ---- .../generated_samples/bastion_host_get.py | 41 ---- .../bastion_host_list_by_resource_group.py | 41 ---- .../bastion_host_list_by_subscription.py | 39 ---- .../generated_samples/bastion_host_patch.py | 42 ---- .../generated_samples/bastion_host_put.py | 58 ----- .../bastion_session_delete.py | 43 ---- .../bastion_sessions_list.py | 42 ---- .../bastion_shareable_link_create.py | 56 ----- .../bastion_shareable_link_delete.py | 54 ----- .../bastion_shareable_link_get.py | 56 ----- .../check_dns_name_availability.py | 40 ---- .../check_private_link_service_visibility.py | 41 ---- ...nk_service_visibility_by_resource_group.py | 42 ---- .../cloud_service_network_interface_get.py | 43 ---- .../cloud_service_network_interface_list.py | 42 ---- .../cloud_service_public_ip_get.py | 45 ---- .../cloud_service_public_ip_list_all.py | 42 ---- ...ce_role_instance_network_interface_list.py | 43 ---- ...ud_service_role_instance_public_ip_list.py | 45 ---- .../cloud_service_swap_get.py | 41 ---- .../cloud_service_swap_list.py | 41 ---- .../cloud_service_swap_put.py | 41 ---- .../configuration_policy_group_delete.py | 41 ---- .../configuration_policy_group_get.py | 42 ---- ..._group_list_by_vpn_server_configuration.py | 42 ---- .../configuration_policy_group_put.py | 52 ----- ...stom_ip_prefix_create_customized_values.py | 42 ---- .../custom_ip_prefix_delete.py | 40 ---- .../generated_samples/custom_ip_prefix_get.py | 41 ---- .../custom_ip_prefix_list.py | 41 ---- .../custom_ip_prefix_list_all.py | 39 ---- .../custom_ip_prefix_update_tags.py | 42 ---- .../ddos_custom_policy_create.py | 42 ---- .../ddos_custom_policy_delete.py | 40 ---- .../ddos_custom_policy_get.py | 41 ---- .../ddos_custom_policy_update_tags.py | 42 ---- .../ddos_protection_plan_create.py | 42 ---- .../ddos_protection_plan_delete.py | 40 ---- .../ddos_protection_plan_get.py | 41 ---- .../ddos_protection_plan_list.py | 41 ---- .../ddos_protection_plan_list_all.py | 39 ---- .../ddos_protection_plan_update_tags.py | 42 ---- .../default_security_rule_get.py | 42 ---- .../default_security_rule_list.py | 42 ---- .../dscp_configuration_create.py | 64 ------ .../dscp_configuration_delete.py | 40 ---- .../dscp_configuration_get.py | 41 ---- .../dscp_configuration_list.py | 41 ---- .../dscp_configuration_list_all.py | 39 ---- .../effective_routes_list_for_connection.py | 41 ---- .../effective_routes_list_for_route_table.py | 41 ---- .../effective_routes_list_for_virtual_hub.py | 41 ---- .../endpoint_services_list.py | 41 ---- .../express_route_circuit_arp_table_list.py | 43 ---- ...ress_route_circuit_authorization_create.py | 43 ---- ...ress_route_circuit_authorization_delete.py | 41 ---- ...express_route_circuit_authorization_get.py | 42 ---- ...xpress_route_circuit_authorization_list.py | 42 ---- ...express_route_circuit_connection_create.py | 56 ----- ...express_route_circuit_connection_delete.py | 42 ---- .../express_route_circuit_connection_get.py | 43 ---- .../express_route_circuit_connection_list.py | 43 ---- .../express_route_circuit_create.py | 55 ----- ...te_circuit_create_on_express_route_port.py | 52 ----- .../express_route_circuit_delete.py | 40 ---- .../express_route_circuit_get.py | 41 ---- ...ss_route_circuit_list_by_resource_group.py | 41 ---- ...ress_route_circuit_list_by_subscription.py | 39 ---- .../express_route_circuit_peering_create.py | 50 ---- .../express_route_circuit_peering_delete.py | 41 ---- .../express_route_circuit_peering_get.py | 42 ---- .../express_route_circuit_peering_list.py | 42 ---- .../express_route_circuit_peering_stats.py | 42 ---- .../express_route_circuit_route_table_list.py | 43 ---- ..._route_circuit_route_table_summary_list.py | 43 ---- .../express_route_circuit_stats.py | 41 ---- .../express_route_circuit_update_tags.py | 42 ---- .../express_route_connection_create.py | 78 ------- .../express_route_connection_delete.py | 41 ---- .../express_route_connection_get.py | 42 ---- .../express_route_connection_list.py | 41 ---- ...ute_cross_connection_bgp_peering_create.py | 54 ----- ...ute_cross_connection_bgp_peering_delete.py | 41 ---- ..._route_cross_connection_bgp_peering_get.py | 42 ---- ...route_cross_connection_bgp_peering_list.py | 42 ---- .../express_route_cross_connection_get.py | 41 ---- .../express_route_cross_connection_list.py | 39 ---- ...cross_connection_list_by_resource_group.py | 41 ---- .../express_route_cross_connection_update.py | 42 ---- ...ress_route_cross_connection_update_tags.py | 42 ---- ...press_route_cross_connections_arp_table.py | 43 ---- ...ess_route_cross_connections_route_table.py | 43 ---- ...e_cross_connections_route_table_summary.py | 43 ---- .../express_route_gateway_create.py | 51 ---- .../express_route_gateway_delete.py | 40 ---- .../express_route_gateway_get.py | 41 ---- ...ss_route_gateway_list_by_resource_group.py | 40 ---- ...ress_route_gateway_list_by_subscription.py | 38 --- .../express_route_gateway_update_tags.py | 42 ---- .../express_route_link_get.py | 42 ---- .../express_route_link_list.py | 42 ---- ...express_route_port_authorization_create.py | 43 ---- ...express_route_port_authorization_delete.py | 41 ---- .../express_route_port_authorization_get.py | 42 ---- .../express_route_port_authorization_list.py | 42 ---- .../express_route_port_create.py | 50 ---- .../express_route_port_delete.py | 40 ---- .../express_route_port_get.py | 41 ---- .../express_route_port_list.py | 39 ---- ...press_route_port_list_by_resource_group.py | 41 ---- .../express_route_port_update_link.py | 51 ---- .../express_route_port_update_tags.py | 42 ---- .../express_route_ports_location_get.py | 40 ---- .../express_route_ports_location_list.py | 39 ---- .../express_route_provider_list.py | 39 ---- .../express_route_provider_port.py | 40 ---- .../express_route_provider_port_list.py | 38 --- .../firewall_policy_delete.py | 40 ---- .../generated_samples/firewall_policy_get.py | 41 ---- .../firewall_policy_list_by_resource_group.py | 41 ---- .../firewall_policy_list_by_subscription.py | 39 ---- ...ll_policy_nat_rule_collection_group_get.py | 42 ---- ...ll_policy_nat_rule_collection_group_put.py | 68 ------ .../firewall_policy_patch.py | 42 ---- .../generated_samples/firewall_policy_put.py | 103 --------- ...rewall_policy_query_signature_overrides.py | 48 ---- ...query_signature_overrides_filter_values.py | 42 ---- ...all_policy_rule_collection_group_delete.py | 41 ---- ...rewall_policy_rule_collection_group_get.py | 42 ---- ...ewall_policy_rule_collection_group_list.py | 42 ---- ...rewall_policy_rule_collection_group_put.py | 65 ------ ...ction_group_with_http_headers_to_insert.py | 70 ------ ...ule_collection_group_with_ip_groups_get.py | 42 ---- ...le_collection_group_with_ip_groups_list.py | 42 ---- ...ule_collection_group_with_ip_groups_put.py | 68 ------ ...ollection_group_with_web_categories_get.py | 42 ---- ...llection_group_with_web_categories_list.py | 42 ---- ...ollection_group_with_web_categories_put.py | 64 ------ ...firewall_policy_signature_overrides_get.py | 41 ---- ...irewall_policy_signature_overrides_list.py | 41 ---- ...rewall_policy_signature_overrides_patch.py | 47 ---- ...firewall_policy_signature_overrides_put.py | 47 ---- .../generate_express_route_ports_loa.py | 42 ---- ...an_vpn_server_configuration_vpn_profile.py | 45 ---- ...plication_gateway_waf_dynamic_manifests.py | 41 ---- ...n_gateway_waf_dynamic_manifests_default.py | 40 ---- .../generated_samples/get_inbound_routes.py | 45 ---- .../generated_samples/get_outbound_routes.py | 45 ---- ...t_virtual_wan_vpn_server_configurations.py | 41 ---- .../hub_route_table_delete.py | 41 ---- .../generated_samples/hub_route_table_get.py | 42 ---- .../generated_samples/hub_route_table_list.py | 42 ---- .../generated_samples/hub_route_table_put.py | 56 ----- .../hub_virtual_network_connection_delete.py | 41 ---- .../hub_virtual_network_connection_get.py | 42 ---- .../hub_virtual_network_connection_list.py | 42 ---- .../hub_virtual_network_connection_put.py | 84 ------- .../inbound_nat_rule_create.py | 55 ----- .../inbound_nat_rule_delete.py | 41 ---- .../generated_samples/inbound_nat_rule_get.py | 42 ---- .../inbound_nat_rule_list.py | 42 ---- .../inbound_security_rule_put.py | 47 ---- .../generated_samples/ip_allocation_create.py | 51 ---- .../generated_samples/ip_allocation_delete.py | 40 ---- .../generated_samples/ip_allocation_get.py | 41 ---- .../generated_samples/ip_allocation_list.py | 39 ---- .../ip_allocation_list_by_resource_group.py | 41 ---- .../ip_allocation_update_tags.py | 42 ---- .../generated_samples/ip_groups_create.py | 46 ---- .../generated_samples/ip_groups_delete.py | 40 ---- .../generated_samples/ip_groups_get.py | 41 ---- .../ip_groups_list_by_resource_group.py | 41 ---- .../ip_groups_list_by_subscription.py | 39 ---- .../ip_groups_update_tags.py | 42 ---- ...l_list_with_backend_addresses_pool_type.py | 42 ---- ...address_pool_with_backend_addresses_get.py | 42 ---- ...address_pool_with_backend_addresses_put.py | 66 ------ ...ad_balancer_backend_address_pool_delete.py | 41 ---- .../load_balancer_backend_address_pool_get.py | 42 ---- ...load_balancer_backend_address_pool_list.py | 42 ---- .../generated_samples/load_balancer_create.py | 110 --------- ...r_create_gateway_load_balancer_consumer.py | 113 --------- ...balancer_provider_with_one_backend_pool.py | 107 --------- ...balancer_provider_with_two_backend_pool.py | 101 -------- .../load_balancer_create_global_tier.py | 109 --------- .../load_balancer_create_standard_sku.py | 110 --------- ...d_balancer_create_with_inbound_nat_pool.py | 83 ------- ...oad_balancer_create_with_outbound_rules.py | 126 ---------- .../load_balancer_create_with_zones.py | 111 --------- .../generated_samples/load_balancer_delete.py | 40 ---- ..._balancer_frontend_ip_configuration_get.py | 42 ---- ...balancer_frontend_ip_configuration_list.py | 42 ---- .../generated_samples/load_balancer_get.py | 41 ---- ...ancer_get_inbound_nat_rule_port_mapping.py | 41 ---- .../generated_samples/load_balancer_list.py | 41 ---- .../load_balancer_list_all.py | 39 ---- .../load_balancer_load_balancing_rule_get.py | 42 ---- .../load_balancer_load_balancing_rule_list.py | 42 ---- ..._balancer_network_interface_list_simple.py | 42 ---- ...ad_balancer_network_interface_list_vmss.py | 42 ---- .../load_balancer_outbound_rule_get.py | 42 ---- .../load_balancer_outbound_rule_list.py | 42 ---- .../load_balancer_probe_get.py | 42 ---- .../load_balancer_probe_list.py | 42 ---- .../load_balancer_update_tags.py | 42 ---- ...load_balancers_swap_public_ip_addresses.py | 59 ----- .../local_network_gateway_create.py | 49 ---- .../local_network_gateway_delete.py | 40 ---- .../local_network_gateway_get.py | 41 ---- .../local_network_gateway_list.py | 41 ---- .../local_network_gateway_update_tags.py | 42 ---- .../nat_gateway_create_or_update.py | 57 ----- .../generated_samples/nat_gateway_delete.py | 40 ---- .../generated_samples/nat_gateway_get.py | 41 ---- .../generated_samples/nat_gateway_list.py | 41 ---- .../generated_samples/nat_gateway_list_all.py | 39 ---- .../nat_gateway_update_tags.py | 42 ---- .../generated_samples/nat_rule_delete.py | 41 ---- .../generated_samples/nat_rule_get.py | 42 ---- .../generated_samples/nat_rule_list.py | 42 ---- .../generated_samples/nat_rule_put.py | 51 ---- .../network_interface_create.py | 61 ----- ...e_create_gateway_load_balancer_consumer.py | 63 ----- .../network_interface_delete.py | 40 ---- .../network_interface_effective_nsg_list.py | 41 ---- ...rk_interface_effective_route_table_list.py | 41 ---- .../network_interface_get.py | 41 ---- .../network_interface_ip_configuration_get.py | 42 ---- ...network_interface_ip_configuration_list.py | 42 ---- .../network_interface_list.py | 41 ---- .../network_interface_list_all.py | 39 ---- .../network_interface_load_balancer_list.py | 42 ---- ...work_interface_tap_configuration_create.py | 49 ---- ...work_interface_tap_configuration_delete.py | 41 ---- ...network_interface_tap_configuration_get.py | 42 ---- ...etwork_interface_tap_configuration_list.py | 42 ---- .../network_interface_update_tags.py | 42 ---- ...active_connectivity_configurations_list.py | 42 ---- ...anager_active_security_admin_rules_list.py | 42 ---- ...rk_manager_admin_rule_collection_delete.py | 42 ---- ...twork_manager_admin_rule_collection_get.py | 43 ---- ...work_manager_admin_rule_collection_list.py | 43 ---- ...twork_manager_admin_rule_collection_put.py | 53 ----- .../network_manager_admin_rule_delete.py | 43 ---- .../network_manager_admin_rule_get.py | 44 ---- .../network_manager_admin_rule_list.py | 44 ---- .../network_manager_admin_rule_put.py | 58 ----- .../network_manager_commit_post.py | 48 ---- ...ager_connection_management_group_delete.py | 40 ---- ...manager_connection_management_group_get.py | 41 ---- ...anager_connection_management_group_list.py | 41 ---- ...manager_connection_management_group_put.py | 46 ---- ..._manager_connection_subscription_delete.py | 39 ---- ...ork_manager_connection_subscription_get.py | 40 ---- ...rk_manager_connection_subscription_list.py | 39 ---- ...ork_manager_connection_subscription_put.py | 45 ---- ...nager_connectivity_configuration_delete.py | 41 ---- ..._manager_connectivity_configuration_get.py | 42 ---- ...manager_connectivity_configuration_list.py | 42 ---- ..._manager_connectivity_configuration_put.py | 64 ------ .../network_manager_default_admin_rule_get.py | 44 ---- .../network_manager_default_admin_rule_put.py | 45 ---- .../network_manager_delete.py | 40 ---- .../network_manager_deployment_status_list.py | 46 ---- ...ective_connectivity_configurations_list.py | 42 ---- ...ger_effective_security_admin_rules_list.py | 42 ---- .../generated_samples/network_manager_get.py | 41 ---- .../network_manager_group_delete.py | 41 ---- .../network_manager_group_get.py | 42 ---- .../network_manager_group_list.py | 42 ---- .../network_manager_group_put.py | 43 ---- .../generated_samples/network_manager_list.py | 41 ---- .../network_manager_list_all.py | 39 ---- .../network_manager_patch.py | 42 ---- .../generated_samples/network_manager_put.py | 51 ---- ...network_manager_scope_connection_delete.py | 41 ---- .../network_manager_scope_connection_get.py | 42 ---- .../network_manager_scope_connection_list.py | 42 ---- .../network_manager_scope_connection_put.py | 49 ---- ...ger_security_admin_configuration_delete.py | 41 ---- ...anager_security_admin_configuration_get.py | 42 ---- ...nager_security_admin_configuration_list.py | 42 ---- ...anager_security_admin_configuration_put.py | 45 ---- .../network_manager_static_member_delete.py | 42 ---- .../network_manager_static_member_get.py | 43 ---- .../network_manager_static_member_list.py | 43 ---- .../network_manager_static_member_put.py | 48 ---- .../network_profile_create_config_only.py | 63 ----- .../network_profile_delete.py | 40 ---- .../network_profile_get_config_only.py | 41 ---- .../network_profile_get_with_container_nic.py | 41 ---- .../generated_samples/network_profile_list.py | 41 ---- .../network_profile_list_all.py | 39 ---- .../network_profile_update_tags.py | 42 ---- .../network_security_group_create.py | 42 ---- ...network_security_group_create_with_rule.py | 61 ----- .../network_security_group_delete.py | 40 ---- .../network_security_group_get.py | 41 ---- .../network_security_group_list.py | 41 ---- .../network_security_group_list_all.py | 39 ---- .../network_security_group_rule_create.py | 54 ----- .../network_security_group_rule_delete.py | 41 ---- .../network_security_group_rule_get.py | 42 ---- .../network_security_group_rule_list.py | 42 ---- .../network_security_group_update_tags.py | 42 ---- ...ork_virtual_appliance_connection_delete.py | 41 ---- ...etwork_virtual_appliance_connection_get.py | 42 ---- ...twork_virtual_appliance_connection_list.py | 42 ---- ...etwork_virtual_appliance_connection_put.py | 70 ------ .../network_virtual_appliance_delete.py | 40 ---- .../network_virtual_appliance_get.py | 41 ---- ...irtual_appliance_list_by_resource_group.py | 41 ---- ..._virtual_appliance_list_by_subscription.py | 39 ---- .../network_virtual_appliance_put.py | 65 ------ .../network_virtual_appliance_saa_sput.py | 51 ---- .../network_virtual_appliance_site_delete.py | 41 ---- .../network_virtual_appliance_site_get.py | 42 ---- .../network_virtual_appliance_site_list.py | 42 ---- .../network_virtual_appliance_site_put.py | 48 ---- .../network_virtual_appliance_sku_get.py | 40 ---- .../network_virtual_appliance_sku_list.py | 39 ---- .../network_virtual_appliance_update_tags.py | 42 ---- ...rk_watcher_available_providers_list_get.py | 47 ---- ...k_watcher_azure_reachability_report_get.py | 48 ---- ...twork_watcher_connection_monitor_create.py | 65 ------ ...twork_watcher_connection_monitor_delete.py | 41 ---- .../network_watcher_connection_monitor_get.py | 42 ---- ...network_watcher_connection_monitor_list.py | 42 ---- ...etwork_watcher_connection_monitor_query.py | 42 ---- ...etwork_watcher_connection_monitor_start.py | 41 ---- ...network_watcher_connection_monitor_stop.py | 41 ---- ..._watcher_connection_monitor_update_tags.py | 43 ---- ...rk_watcher_connection_monitor_v2_create.py | 77 ------- .../network_watcher_connectivity_check.py | 48 ---- .../network_watcher_create.py | 42 ---- .../network_watcher_delete.py | 40 ---- .../network_watcher_flow_log_configure.py | 48 ---- .../network_watcher_flow_log_create.py | 51 ---- .../network_watcher_flow_log_delete.py | 41 ---- .../network_watcher_flow_log_get.py | 42 ---- .../network_watcher_flow_log_list.py | 42 ---- .../network_watcher_flow_log_status_query.py | 44 ---- .../network_watcher_flow_log_update_tags.py | 43 ---- .../generated_samples/network_watcher_get.py | 41 ---- .../network_watcher_ip_flow_verify.py | 50 ---- .../generated_samples/network_watcher_list.py | 41 ---- .../network_watcher_list_all.py | 39 ---- ...atcher_network_configuration_diagnostic.py | 53 ----- .../network_watcher_next_hop_get.py | 47 ---- .../network_watcher_packet_capture_create.py | 56 ----- .../network_watcher_packet_capture_delete.py | 41 ---- .../network_watcher_packet_capture_get.py | 42 ---- ...ork_watcher_packet_capture_query_status.py | 42 ---- .../network_watcher_packet_capture_stop.py | 41 ---- .../network_watcher_packet_captures_list.py | 42 ---- ...network_watcher_security_group_view_get.py | 44 ---- .../network_watcher_topology_get.py | 42 ---- .../network_watcher_troubleshoot_get.py | 48 ---- ...twork_watcher_troubleshoot_result_query.py | 44 ---- .../network_watcher_update_tags.py | 42 ---- .../generated_samples/operation_list.py | 39 ---- .../p2_svpn_gateway_delete.py | 40 ---- .../p2_svpn_gateway_generate_vpn_profile.py | 42 ---- .../generated_samples/p2_svpn_gateway_get.py | 41 ---- .../p2_svpn_gateway_get_connection_health.py | 41 ---- ..._gateway_get_connection_health_detailed.py | 45 ---- .../generated_samples/p2_svpn_gateway_list.py | 39 ---- .../p2_svpn_gateway_list_by_resource_group.py | 41 ---- .../p2_svpn_gateway_reset.py | 41 ---- ...er_express_route_circuit_connection_get.py | 43 ---- ...r_express_route_circuit_connection_list.py | 43 ---- .../private_endpoint_create.py | 65 ------ ...ate_endpoint_create_for_manual_approval.py | 65 ------ .../private_endpoint_create_with_asg.py | 63 ----- .../private_endpoint_delete.py | 40 ---- .../private_endpoint_dns_zone_group_create.py | 53 ----- .../private_endpoint_dns_zone_group_delete.py | 41 ---- .../private_endpoint_dns_zone_group_get.py | 42 ---- .../private_endpoint_dns_zone_group_list.py | 42 ---- .../generated_samples/private_endpoint_get.py | 41 ---- ...rivate_endpoint_get_for_manual_approval.py | 41 ---- .../private_endpoint_get_with_asg.py | 41 ---- .../private_endpoint_list.py | 41 ---- .../private_endpoint_list_all.py | 39 ---- .../private_link_service_create.py | 67 ------ .../private_link_service_delete.py | 40 ---- ...vice_delete_private_endpoint_connection.py | 41 ---- .../private_link_service_get.py | 41 ---- ...service_get_private_endpoint_connection.py | 42 ---- .../private_link_service_list.py | 41 ---- .../private_link_service_list_all.py | 39 ---- ...ervice_list_private_endpoint_connection.py | 42 ---- ...vice_update_private_endpoint_connection.py | 54 ----- ...lic_ip_address_create_customized_values.py | 50 ---- .../public_ip_address_create_defaults.py | 42 ---- .../public_ip_address_create_dns.py | 42 ---- ...create_dns_with_domain_name_label_scope.py | 45 ---- .../public_ip_address_delete.py | 40 ---- .../public_ip_address_get.py | 41 ---- ...c_ip_address_get_ddos_protection_status.py | 41 ---- .../public_ip_address_list.py | 41 ---- .../public_ip_address_list_all.py | 39 ---- .../public_ip_address_update_tags.py | 42 ---- ...blic_ip_prefix_create_customized_values.py | 46 ---- .../public_ip_prefix_create_defaults.py | 42 ---- .../public_ip_prefix_delete.py | 40 ---- .../generated_samples/public_ip_prefix_get.py | 41 ---- .../public_ip_prefix_list.py | 41 ---- .../public_ip_prefix_list_all.py | 39 ---- .../public_ip_prefix_update_tags.py | 42 ---- .../query_inbound_nat_rule_port_mapping.py | 43 ---- .../generated_samples/route_filter_create.py | 57 ----- .../generated_samples/route_filter_delete.py | 40 ---- .../generated_samples/route_filter_get.py | 41 ---- .../generated_samples/route_filter_list.py | 39 ---- .../route_filter_list_by_resource_group.py | 41 ---- .../route_filter_rule_create.py | 49 ---- .../route_filter_rule_delete.py | 41 ---- .../route_filter_rule_get.py | 42 ---- .../route_filter_rule_list_by_route_filter.py | 42 ---- .../route_filter_update_tags.py | 42 ---- .../generated_samples/route_map_delete.py | 41 ---- .../generated_samples/route_map_get.py | 42 ---- .../generated_samples/route_map_list.py | 42 ---- .../generated_samples/route_map_put.py | 62 ----- .../generated_samples/route_table_create.py | 42 ---- .../route_table_create_with_route.py | 53 ----- .../generated_samples/route_table_delete.py | 40 ---- .../generated_samples/route_table_get.py | 41 ---- .../generated_samples/route_table_list.py | 41 ---- .../generated_samples/route_table_list_all.py | 39 ---- .../route_table_route_create.py | 43 ---- .../route_table_route_delete.py | 41 ---- .../route_table_route_get.py | 42 ---- .../route_table_route_list.py | 42 ---- .../route_table_update_tags.py | 42 ---- .../routing_intent_delete.py | 41 ---- .../generated_samples/routing_intent_get.py | 42 ---- .../generated_samples/routing_intent_list.py | 42 ---- .../generated_samples/routing_intent_put.py | 58 ----- .../security_partner_provider_delete.py | 40 ---- .../security_partner_provider_get.py | 41 ---- ...partner_provider_list_by_resource_group.py | 41 ---- ...y_partner_provider_list_by_subscription.py | 39 ---- .../security_partner_provider_put.py | 51 ---- .../security_partner_provider_update_tags.py | 42 ---- .../service_community_list.py | 39 ---- .../service_endpoint_policy_create.py | 42 ---- ..._endpoint_policy_create_with_definition.py | 60 ----- ...rvice_endpoint_policy_definition_create.py | 53 ----- ...rvice_endpoint_policy_definition_delete.py | 41 ---- .../service_endpoint_policy_definition_get.py | 42 ---- ...service_endpoint_policy_definition_list.py | 42 ---- .../service_endpoint_policy_delete.py | 40 ---- .../service_endpoint_policy_get.py | 41 ---- .../service_endpoint_policy_list.py | 41 ---- .../service_endpoint_policy_list_all.py | 39 ---- .../service_endpoint_policy_update_tags.py | 42 ---- .../service_tag_information_list_result.py | 41 ---- ...on_list_result_with_no_address_prefixes.py | 41 ---- ...ag_information_list_result_with_tagname.py | 41 ---- .../generated_samples/service_tags_list.py | 40 ---- .../generated_samples/subnet_create.py | 43 ---- .../subnet_create_service_endpoint.py | 45 ---- .../subnet_create_with_delegation.py | 43 ---- .../generated_samples/subnet_delete.py | 41 ---- .../generated_samples/subnet_get.py | 42 ---- .../subnet_get_with_delegation.py | 42 ---- .../generated_samples/subnet_list.py | 42 ---- .../subnet_prepare_network_policies.py | 42 ---- .../subnet_unprepare_network_policies.py | 42 ---- .../generated_samples/usage_list.py | 41 ---- .../usage_list_spaced_location.py | 41 ---- .../virtual_hub_bgp_connection_delete.py | 41 ---- .../virtual_hub_bgp_connection_get.py | 42 ---- .../virtual_hub_bgp_connection_list.py | 42 ---- .../virtual_hub_bgp_connection_put.py | 51 ---- .../generated_samples/virtual_hub_delete.py | 40 ---- .../generated_samples/virtual_hub_get.py | 41 ---- .../virtual_hub_ip_configuration_delete.py | 41 ---- .../virtual_hub_ip_configuration_get.py | 42 ---- .../virtual_hub_ip_configuration_list.py | 42 ---- .../virtual_hub_ip_configuration_put.py | 49 ---- .../generated_samples/virtual_hub_list.py | 39 ---- .../virtual_hub_list_by_resource_group.py | 41 ---- .../generated_samples/virtual_hub_put.py | 52 ----- .../virtual_hub_route_table_v2_delete.py | 41 ---- .../virtual_hub_route_table_v2_get.py | 42 ---- .../virtual_hub_route_table_v2_list.py | 42 ---- .../virtual_hub_route_table_v2_put.py | 61 ----- .../virtual_hub_update_tags.py | 42 ---- ...l_network_check_ip_address_availability.py | 41 ---- .../virtual_network_create.py | 45 ---- ..._network_create_service_endpoint_policy.py | 61 ----- ...irtual_network_create_service_endpoints.py | 56 ----- .../virtual_network_create_subnet.py | 48 ---- ...ork_create_subnet_with_address_prefixes.py | 48 ---- ...l_network_create_subnet_with_delegation.py | 61 ----- ...ual_network_create_with_bgp_communities.py | 49 ---- .../virtual_network_create_with_encryption.py | 49 ---- .../virtual_network_delete.py | 40 ---- ...rtual_network_gateway_connection_create.py | 113 --------- ...rtual_network_gateway_connection_delete.py | 40 ---- .../virtual_network_gateway_connection_get.py | 41 ---- ..._network_gateway_connection_get_ike_sas.py | 41 ---- ...twork_gateway_connection_get_shared_key.py | 41 ---- ...irtual_network_gateway_connection_reset.py | 40 ---- ...ork_gateway_connection_reset_shared_key.py | 42 ---- ...twork_gateway_connection_set_shared_key.py | 42 ---- ...gateway_connection_start_packet_capture.py | 41 ---- ...ection_start_packet_capture_filter_data.py | 41 ---- ..._gateway_connection_stop_packet_capture.py | 44 ---- ..._network_gateway_connection_update_tags.py | 42 ---- ...irtual_network_gateway_connections_list.py | 41 ---- .../virtual_network_gateway_delete.py | 40 ---- .../virtual_network_gateway_get.py | 41 ---- ...l_network_gateway_get_advertised_routes.py | 41 ---- ...ual_network_gateway_get_bgp_peer_status.py | 41 ---- ...gateway_get_vpn_client_ipsec_parameters.py | 41 ---- ...ork_gateway_get_vpn_profile_package_url.py | 41 ---- ...gateway_get_vpnclient_connection_health.py | 41 ---- .../virtual_network_gateway_learned_routes.py | 41 ---- .../virtual_network_gateway_list.py | 41 ---- ...virtual_network_gateway_nat_rule_delete.py | 41 ---- .../virtual_network_gateway_nat_rule_get.py | 42 ---- .../virtual_network_gateway_nat_rule_list.py | 42 ---- .../virtual_network_gateway_nat_rule_put.py | 51 ---- .../virtual_network_gateway_reset.py | 41 ---- ...ork_gateway_reset_vpn_client_shared_key.py | 40 ---- ...gateway_set_vpn_client_ipsec_parameters.py | 51 ---- ...al_network_gateway_start_packet_capture.py | 41 ---- ...ateway_start_packet_capture_filter_data.py | 41 ---- ...ual_network_gateway_stop_packet_capture.py | 44 ---- ...al_network_gateway_supported_vpn_device.py | 41 ---- .../virtual_network_gateway_update.py | 108 --------- .../virtual_network_gateway_update_tags.py | 42 ---- ...gateway_vpn_device_configuration_script.py | 42 ---- ...gateways_disconnect_p2s_vpn_connections.py | 41 ---- ...rtual_network_gateways_list_connections.py | 42 ---- .../generated_samples/virtual_network_get.py | 41 ---- ...tual_network_get_ddos_protection_status.py | 42 ---- ...l_network_get_resource_navigation_links.py | 42 ---- ...l_network_get_service_association_links.py | 42 ---- ...twork_get_with_service_association_link.py | 41 ---- ...tual_network_get_with_subnet_delegation.py | 41 ---- .../generated_samples/virtual_network_list.py | 41 ---- .../virtual_network_list_all.py | 39 ---- .../virtual_network_list_usage.py | 42 ---- .../virtual_network_peering_create.py | 53 ----- ..._with_remote_virtual_network_encryption.py | 53 ----- .../virtual_network_peering_delete.py | 41 ---- .../virtual_network_peering_get.py | 42 ---- ..._with_remote_virtual_network_encryption.py | 42 ---- .../virtual_network_peering_list.py | 42 ---- ..._with_remote_virtual_network_encryption.py | 42 ---- .../virtual_network_peering_sync.py | 53 ----- .../virtual_network_tap_create.py | 49 ---- .../virtual_network_tap_delete.py | 40 ---- .../virtual_network_tap_get.py | 41 ---- .../virtual_network_tap_list.py | 41 ---- .../virtual_network_tap_list_all.py | 39 ---- .../virtual_network_tap_update_tags.py | 42 ---- .../virtual_network_update_tags.py | 42 ---- .../virtual_router_delete.py | 40 ---- .../generated_samples/virtual_router_get.py | 41 ---- .../virtual_router_list_by_resource_group.py | 41 ---- .../virtual_router_list_by_subscription.py | 39 ---- ...rtual_router_peer_list_advertised_route.py | 42 ---- .../virtual_router_peer_list_learned_route.py | 42 ---- .../virtual_router_peering_delete.py | 41 ---- .../virtual_router_peering_get.py | 42 ---- .../virtual_router_peering_list.py | 42 ---- .../virtual_router_peering_put.py | 43 ---- .../generated_samples/virtual_router_put.py | 50 ---- .../generated_samples/virtual_wan_delete.py | 40 ---- .../generated_samples/virtual_wan_get.py | 41 ---- .../generated_samples/virtual_wan_list.py | 39 ---- .../virtual_wan_list_by_resource_group.py | 41 ---- .../generated_samples/virtual_wan_put.py | 46 ---- ...irtual_wan_supported_security_providers.py | 41 ---- .../virtual_wan_update_tags.py | 42 ---- .../vpn_connection_delete.py | 41 ---- .../generated_samples/vpn_connection_get.py | 42 ---- .../generated_samples/vpn_connection_list.py | 42 ---- .../generated_samples/vpn_connection_put.py | 90 -------- .../vpn_connection_start_packet_capture.py | 42 ---- ...ection_start_packet_capture_filter_data.py | 42 ---- .../vpn_connection_stop_packet_capture.py | 42 ---- .../generated_samples/vpn_gateway_delete.py | 40 ---- .../generated_samples/vpn_gateway_get.py | 41 ---- .../generated_samples/vpn_gateway_list.py | 39 ---- .../vpn_gateway_list_by_resource_group.py | 41 ---- .../generated_samples/vpn_gateway_put.py | 100 -------- .../generated_samples/vpn_gateway_reset.py | 41 ---- .../vpn_gateway_start_packet_capture.py | 41 ---- ...ateway_start_packet_capture_filter_data.py | 41 ---- .../vpn_gateway_stop_packet_capture.py | 41 ---- .../vpn_gateway_update_tags.py | 42 ---- .../vpn_server_configuration_delete.py | 40 ---- .../vpn_server_configuration_get.py | 41 ---- .../vpn_server_configuration_list.py | 39 ---- ...er_configuration_list_by_resource_group.py | 41 ---- .../vpn_server_configuration_put.py | 115 ---------- .../vpn_server_configuration_update_tags.py | 42 ---- .../generated_samples/vpn_site_delete.py | 40 ---- .../generated_samples/vpn_site_get.py | 41 ---- .../vpn_site_link_connection_get.py | 43 ---- .../vpn_site_link_connection_get_ike_sas.py | 43 ---- .../vpn_site_link_connection_list.py | 43 ---- .../vpn_site_link_connection_reset.py | 42 ---- .../generated_samples/vpn_site_link_get.py | 42 ---- .../vpn_site_link_list_by_vpn_site.py | 42 ---- .../generated_samples/vpn_site_list.py | 39 ---- .../vpn_site_list_by_resource_group.py | 41 ---- .../generated_samples/vpn_site_put.py | 64 ------ .../generated_samples/vpn_site_update_tags.py | 42 ---- .../vpn_sites_configuration_download.py | 44 ---- .../waf_list_all_policies.py | 39 ---- .../generated_samples/waf_list_policies.py | 41 ---- .../waf_policy_create_or_update.py | 165 ------------- .../generated_samples/waf_policy_delete.py | 40 ---- .../generated_samples/waf_policy_get.py | 41 ---- 681 files changed, 3 insertions(+), 31282 deletions(-) delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/nat_rule_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/operation_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_map_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_map_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_map_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_community_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/usage_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create_with_remote_virtual_network_encryption.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_sync.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_put.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_site_update_tags.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py delete mode 100644 sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py diff --git a/sdk/network/azure-mgmt-network/MANIFEST.in b/sdk/network/azure-mgmt-network/MANIFEST.in index f6b53cfcebd1..0b2838135bab 100644 --- a/sdk/network/azure-mgmt-network/MANIFEST.in +++ b/sdk/network/azure-mgmt-network/MANIFEST.in @@ -6,3 +6,4 @@ include azure/__init__.py include azure/mgmt/__init__.py include LICENSE include azure/mgmt/network/py.typed +prune azure/mgmt/network/v20* diff --git a/sdk/network/azure-mgmt-network/_meta.json b/sdk/network/azure-mgmt-network/_meta.json index 70b2a428fbde..52918a7a9ab6 100644 --- a/sdk/network/azure-mgmt-network/_meta.json +++ b/sdk/network/azure-mgmt-network/_meta.json @@ -1,12 +1,12 @@ { - "commit": "23d88533ddfde4d1565a897fe95d42fb0d9333e5", + "commit": "dc8e57407efc3c2557cf6aaa1e6384df590bf2b3", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.6", "use": [ "@autorest/python@6.6.0", "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.26.2 --version=3.9.6 --version-tolerant=False", + "autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.26.2 --version=3.9.6 --version-tolerant=False", "readme": "specification/network/resource-manager/readme.md", "package-2023-02": "2023-06-19 07:26:19 +0530 0b4a0a3f4bfc198df608f373784505e42e248c2c Microsoft.Network/stable/2023-02-01/networkVirtualAppliance.json", "package-2021-02": "2021-09-14 19:30:27 -0700 54f1c87938269d4706629dc04c26ee1f3634585a Microsoft.Network/stable/2021-02-01/privateLinkService.json", 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 deleted file mode 100644 index 274bec083ff8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_get.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_request_headers_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="72f988bf-86f1-41af-91ab-2d7cd0dddd4", - ) - - response = client.application_gateways.list_available_request_headers() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e31511b1cda..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_response_headers_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="72f988bf-86f1-41af-91ab-2d7cd0dddd4", - ) - - response = client.application_gateways.list_available_response_headers() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 627652f18271..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_server_variables_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="72f988bf-86f1-41af-91ab-2d7cd0dddd4", - ) - - response = client.application_gateways.list_available_server_variables() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 06e145fab245..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_ssl_options_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="subid", - ) - - response = client.application_gateways.list_available_ssl_options() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 35388cb2d35d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_ssl_options_predefined_policies_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="subid", - ) - - response = client.application_gateways.list_available_ssl_predefined_policies() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9a1c5aeba45b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_ssl_options_predefined_policy_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="subid", - ) - - response = client.application_gateways.get_ssl_predefined_policy( - predefined_policy_name="AppGwSslPolicy20150501", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d057019fbbef..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_available_waf_rule_sets_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="subid", - ) - - response = client.application_gateways.list_available_waf_rule_sets() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bf5c4c32a8fe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_backend_health_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="subid", - ) - - response = client.application_gateways.begin_backend_health( - resource_group_name="appgw", - application_gateway_name="appgw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 67a842a95e38..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_backend_health_test.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.application_gateways.begin_backend_health_on_demand( - resource_group_name="rg1", - application_gateway_name="appgw", - probe_request={ - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool" - }, - "backendHttpSettings": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings" - }, - "path": "/", - "pickHostNameFromBackendHttpSettings": True, - "protocol": "Http", - "timeout": 30, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5125a1d2c786..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_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="subid", - ) - - response = client.application_gateways.begin_create_or_update( - resource_group_name="rg1", - application_gateway_name="appgw", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "eastus", - "properties": { - "backendAddressPools": [ - { - "name": "appgwpool", - "properties": {"backendAddresses": [{"ipAddress": "10.0.1.1"}, {"ipAddress": "10.0.1.2"}]}, - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1", - "name": "appgwpool1", - "properties": {"backendAddresses": [{"ipAddress": "10.0.0.1"}, {"ipAddress": "10.0.0.2"}]}, - }, - ], - "backendHttpSettingsCollection": [ - { - "name": "appgwbhs", - "properties": { - "cookieBasedAffinity": "Disabled", - "port": 80, - "protocol": "Http", - "requestTimeout": 30, - }, - } - ], - "frontendIPConfigurations": [ - { - "name": "appgwfip", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip" - } - }, - } - ], - "frontendPorts": [ - {"name": "appgwfp", "properties": {"port": 443}}, - {"name": "appgwfp80", "properties": {"port": 80}}, - ], - "gatewayIPConfigurations": [ - { - "name": "appgwipc", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet" - } - }, - } - ], - "globalConfiguration": {"enableRequestBuffering": True, "enableResponseBuffering": True}, - "httpListeners": [ - { - "name": "appgwhl", - "properties": { - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip" - }, - "frontendPort": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp" - }, - "protocol": "Https", - "requireServerNameIndication": False, - "sslCertificate": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert" - }, - "sslProfile": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1" - }, - }, - }, - { - "name": "appgwhttplistener", - "properties": { - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip" - }, - "frontendPort": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80" - }, - "protocol": "Http", - }, - }, - ], - "requestRoutingRules": [ - { - "name": "appgwrule", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool" - }, - "backendHttpSettings": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs" - }, - "httpListener": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl" - }, - "priority": 10, - "rewriteRuleSet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1" - }, - "ruleType": "Basic", - }, - } - ], - "rewriteRuleSets": [ - { - "name": "rewriteRuleSet1", - "properties": { - "rewriteRules": [ - { - "actionSet": { - "requestHeaderConfigurations": [ - { - "headerName": "X-Forwarded-For", - "headerValue": "{var_add_x_forwarded_for_proxy}", - } - ], - "responseHeaderConfigurations": [ - { - "headerName": "Strict-Transport-Security", - "headerValue": "max-age=31536000", - } - ], - "urlConfiguration": {"modifiedPath": "/abc"}, - }, - "conditions": [ - { - "ignoreCase": True, - "negate": False, - "pattern": "^Bearer", - "variable": "http_req_Authorization", - } - ], - "name": "Set X-Forwarded-For", - "ruleSequence": 102, - } - ] - }, - } - ], - "sku": {"capacity": 3, "name": "Standard_v2", "tier": "Standard_v2"}, - "sslCertificates": [ - {"name": "sslcert", "properties": {"data": "****", "password": "****"}}, - {"name": "sslcert2", "properties": {"keyVaultSecretId": "https://kv/secret"}}, - ], - "sslProfiles": [ - { - "name": "sslProfile1", - "properties": { - "clientAuthConfiguration": {"verifyClientCertIssuerDN": True}, - "sslPolicy": { - "cipherSuites": ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"], - "minProtocolVersion": "TLSv1_1", - "policyType": "Custom", - }, - "trustedClientCertificates": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert" - } - ], - }, - } - ], - "trustedClientCertificates": [{"name": "clientcert", "properties": {"data": "****"}}], - "trustedRootCertificates": [ - {"name": "rootcert", "properties": {"data": "****"}}, - {"name": "rootcert1", "properties": {"keyVaultSecretId": "https://kv/secret"}}, - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c26a0dcbacd6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_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="subid", - ) - - client.application_gateways.begin_delete( - resource_group_name="rg1", - application_gateway_name="appgw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6d4f29639a64..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_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="subid", - ) - - response = client.application_gateways.get( - resource_group_name="rg1", - application_gateway_name="appgw", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4f88f69c7e59..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_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="subid", - ) - - response = client.application_gateways.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4d7a995561db..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_list_all.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.application_gateways.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 26c63e01563f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_private_endpoint_connection_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="subid", - ) - - client.application_gateway_private_endpoint_connections.begin_delete( - resource_group_name="rg1", - application_gateway_name="appgw", - connection_name="connection1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 560d80977234..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_private_endpoint_connection_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="subid", - ) - - response = client.application_gateway_private_endpoint_connections.get( - resource_group_name="rg1", - application_gateway_name="appgw", - connection_name="connection1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 49e05dc71f32..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_private_endpoint_connection_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="subid", - ) - - response = client.application_gateway_private_endpoint_connections.list( - resource_group_name="rg1", - application_gateway_name="appgw", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f7c15a1b822a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_private_endpoint_connection_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="subid", - ) - - response = client.application_gateway_private_endpoint_connections.begin_update( - resource_group_name="rg1", - application_gateway_name="appgw", - connection_name="connection1", - parameters={ - "name": "connection1", - "properties": { - "privateEndpoint": { - "id": "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe" - }, - "privateLinkServiceConnectionState": { - "description": "approved it for some reason.", - "status": "Approved", - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 06fec25829f5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_private_link_resource_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="subid", - ) - - response = client.application_gateway_private_link_resources.list( - resource_group_name="rg1", - application_gateway_name="appgw", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f6ef0143a424..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_start.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", - ) - - client.application_gateways.begin_start( - resource_group_name="rg1", - application_gateway_name="appgw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6f40b54e920c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_stop.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", - ) - - client.application_gateways.begin_stop( - resource_group_name="rg1", - application_gateway_name="appgw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bb3da244a7bf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_gateway_update_tags.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.application_gateways.update_tags( - resource_group_name="rg1", - application_gateway_name="AppGw", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fa6145c80577..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_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="subid", - ) - - response = client.application_security_groups.begin_create_or_update( - resource_group_name="rg1", - application_security_group_name="test-asg", - parameters={"location": "westus", "properties": {}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6d5fb3d93995..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_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="subid", - ) - - client.application_security_groups.begin_delete( - resource_group_name="rg1", - application_security_group_name="test-asg", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a389e47088f1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_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="subid", - ) - - response = client.application_security_groups.get( - resource_group_name="rg1", - application_security_group_name="test-asg", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d8bef7f8d31b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_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="subid", - ) - - response = client.application_security_groups.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5fc1b2036c41..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_list_all.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.application_security_groups.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 35aa0c04e845..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python application_security_group_update_tags.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.application_security_groups.update_tags( - resource_group_name="rg1", - application_security_group_name="test-asg", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6c711303d97b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python auto_approved_private_link_services_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="subId", - ) - - response = client.private_link_services.list_auto_approved_private_link_services( - location="regionName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 029ce72394c7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python auto_approved_private_link_services_resource_group_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="subId", - ) - - response = client.private_link_services.list_auto_approved_private_link_services_by_resource_group( - location="regionName", - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cb0e0c6e7381..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_delegations_resource_group_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="subId", - ) - - response = client.available_resource_group_delegations.list( - location="westcentralus", - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f3ac77ee56ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_delegations_subscription_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="subId", - ) - - response = client.available_delegations.list( - location="westcentralus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 39cbaf0a2131..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_private_endpoint_types_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="subId", - ) - - response = client.available_private_endpoint_types.list( - location="regionName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index df1c83636a87..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_private_endpoint_types_resource_group_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="subId", - ) - - response = client.available_private_endpoint_types.list_by_resource_group( - location="regionName", - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 80541937337d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_service_aliases_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="subId", - ) - - response = client.available_service_aliases.list( - location="westcentralus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 682f242975c3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python available_service_aliases_list_by_resource_group.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.available_service_aliases.list_by_resource_group( - resource_group_name="rg1", - location="westcentralus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index db1f6648b195..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_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="subid", - ) - - client.azure_firewalls.begin_delete( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7282403ef9ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_fqdn_tags_list_by_subscription.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.azure_firewall_fqdn_tags.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 860fe8894fc3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_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="subid", - ) - - response = client.azure_firewalls.get( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 618d5ede1311..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_get_with_additional_properties.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.azure_firewalls.get( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d508379a18d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_get_with_ip_groups.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.azure_firewalls.get( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4f9320fcdecf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_get_with_mgmt_subnet.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.azure_firewalls.get( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f0fd24eb1d30..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_get_with_zones.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.azure_firewalls.get( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9b4e6671dedb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_list_by_resource_group.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.azure_firewalls.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b59ad3919e4a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_list_by_subscription.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.azure_firewalls.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f4e1ebb50c1f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_list_learned_ip_prefixes.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.azure_firewalls.begin_list_learned_prefixes( - resource_group_name="rg1", - azure_firewall_name="azureFirewall1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 004148dbfa48..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_packet_capture.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", - ) - - client.azure_firewalls.begin_packet_capture( - resource_group_name="rg1", - azure_firewall_name="azureFirewall1", - parameters={ - "properties": { - "durationInSeconds": 300, - "fileName": "azureFirewallPacketCapture", - "filters": [ - {"destinationPorts": ["4500"], "destinations": ["20.1.2.0"], "sources": ["20.1.1.0"]}, - { - "destinationPorts": ["123", "80"], - "destinations": ["10.1.2.0"], - "sources": ["10.1.1.0", "10.1.1.1"], - }, - ], - "flags": [{"type": "syn"}, {"type": "fin"}], - "numberOfPacketsToCapture": 5000, - "protocol": "Any", - "sasUrl": "someSASURL", - } - }, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c7c1b7fdb94d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_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="subid", - ) - - response = client.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US", - "properties": { - "applicationRuleCollections": [ - { - "name": "apprulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 110, - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "targetFqdns": ["www.test.com"], - } - ], - }, - } - ], - "ipConfigurations": [ - { - "name": "azureFirewallIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet" - }, - }, - } - ], - "natRuleCollections": [ - { - "name": "natrulecoll", - "properties": { - "action": {"type": "Dnat"}, - "priority": 112, - "rules": [ - { - "description": "D-NAT all outbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["443"], - "name": "DNAT-HTTPS-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedAddress": "1.2.3.5", - "translatedPort": "8443", - }, - { - "description": "D-NAT all inbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["80"], - "name": "DNAT-HTTP-traffic-With-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedFqdn": "internalhttpserver", - "translatedPort": "880", - }, - ], - }, - } - ], - "networkRuleCollections": [ - { - "name": "netrulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 112, - "rules": [ - { - "description": "Block traffic based on source IPs and ports", - "destinationAddresses": ["*"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - "description": "Block traffic based on source IPs and ports to amazon", - "destinationFqdns": ["www.amazon.com"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic-with-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["10.2.4.12-10.2.4.255"], - }, - ], - }, - } - ], - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "threatIntelMode": "Alert", - }, - "tags": {"key1": "value1"}, - "zones": [], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9caba991cd63..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_put_in_hub.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.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US", - "properties": { - "firewallPolicy": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1" - }, - "hubIPAddresses": {"publicIPs": {"addresses": [], "count": 1}}, - "sku": {"name": "AZFW_Hub", "tier": "Standard"}, - "threatIntelMode": "Alert", - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1" - }, - }, - "tags": {"key1": "value1"}, - "zones": [], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 515937deff7f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_put_with_additional_properties.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.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US", - "properties": { - "additionalProperties": {"key1": "value1", "key2": "value2"}, - "applicationRuleCollections": [ - { - "name": "apprulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 110, - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "targetFqdns": ["www.test.com"], - } - ], - }, - } - ], - "ipConfigurations": [ - { - "name": "azureFirewallIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet" - }, - }, - } - ], - "ipGroups": [], - "natRuleCollections": [ - { - "name": "natrulecoll", - "properties": { - "action": {"type": "Dnat"}, - "priority": 112, - "rules": [ - { - "description": "D-NAT all outbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["443"], - "name": "DNAT-HTTPS-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedAddress": "1.2.3.5", - "translatedPort": "8443", - }, - { - "description": "D-NAT all inbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["80"], - "name": "DNAT-HTTP-traffic-With-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedFqdn": "internalhttpserver", - "translatedPort": "880", - }, - ], - }, - } - ], - "networkRuleCollections": [ - { - "name": "netrulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 112, - "rules": [ - { - "description": "Block traffic based on source IPs and ports", - "destinationAddresses": ["*"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - "description": "Block traffic based on source IPs and ports to amazon", - "destinationFqdns": ["www.amazon.com"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic-with-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["10.2.4.12-10.2.4.255"], - }, - ], - }, - } - ], - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "threatIntelMode": "Alert", - }, - "tags": {"key1": "value1"}, - "zones": [], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 487919f385d0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_put_with_ip_groups.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.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US", - "properties": { - "applicationRuleCollections": [ - { - "name": "apprulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 110, - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "targetFqdns": ["www.test.com"], - } - ], - }, - } - ], - "ipConfigurations": [ - { - "name": "azureFirewallIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet" - }, - }, - } - ], - "natRuleCollections": [ - { - "name": "natrulecoll", - "properties": { - "action": {"type": "Dnat"}, - "priority": 112, - "rules": [ - { - "description": "D-NAT all outbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["443"], - "name": "DNAT-HTTPS-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedAddress": "1.2.3.5", - "translatedPort": "8443", - }, - { - "description": "D-NAT all inbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["80"], - "name": "DNAT-HTTP-traffic-With-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedFqdn": "internalhttpserver", - "translatedPort": "880", - }, - ], - }, - } - ], - "networkRuleCollections": [ - { - "name": "netrulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 112, - "rules": [ - { - "description": "Block traffic based on source IPs and ports", - "destinationAddresses": ["*"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - "description": "Block traffic based on source IPs and ports to amazon", - "destinationFqdns": ["www.amazon.com"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic-with-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["10.2.4.12-10.2.4.255"], - }, - ], - }, - } - ], - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "threatIntelMode": "Alert", - }, - "tags": {"key1": "value1"}, - "zones": [], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b70da16fbd6a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_put_with_mgmt_subnet.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.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US", - "properties": { - "applicationRuleCollections": [ - { - "name": "apprulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 110, - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "targetFqdns": ["www.test.com"], - } - ], - }, - } - ], - "ipConfigurations": [ - { - "name": "azureFirewallIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet" - }, - }, - } - ], - "managementIpConfiguration": { - "name": "azureFirewallMgmtIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet" - }, - }, - }, - "natRuleCollections": [ - { - "name": "natrulecoll", - "properties": { - "action": {"type": "Dnat"}, - "priority": 112, - "rules": [ - { - "description": "D-NAT all outbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["443"], - "name": "DNAT-HTTPS-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedAddress": "1.2.3.5", - "translatedPort": "8443", - }, - { - "description": "D-NAT all inbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["80"], - "name": "DNAT-HTTP-traffic-With-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedFqdn": "internalhttpserver", - "translatedPort": "880", - }, - ], - }, - } - ], - "networkRuleCollections": [ - { - "name": "netrulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 112, - "rules": [ - { - "description": "Block traffic based on source IPs and ports", - "destinationAddresses": ["*"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - "description": "Block traffic based on source IPs and ports to amazon", - "destinationFqdns": ["www.amazon.com"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic-with-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["10.2.4.12-10.2.4.255"], - }, - ], - }, - } - ], - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "threatIntelMode": "Alert", - }, - "tags": {"key1": "value1"}, - "zones": [], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dde808f9bebf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_put_with_zones.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.azure_firewalls.begin_create_or_update( - resource_group_name="rg1", - azure_firewall_name="azurefirewall", - parameters={ - "location": "West US 2", - "properties": { - "applicationRuleCollections": [ - { - "name": "apprulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 110, - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "targetFqdns": ["www.test.com"], - } - ], - }, - } - ], - "ipConfigurations": [ - { - "name": "azureFirewallIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet" - }, - }, - } - ], - "natRuleCollections": [ - { - "name": "natrulecoll", - "properties": { - "action": {"type": "Dnat"}, - "priority": 112, - "rules": [ - { - "description": "D-NAT all outbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["443"], - "name": "DNAT-HTTPS-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedAddress": "1.2.3.5", - "translatedPort": "8443", - }, - { - "description": "D-NAT all inbound web traffic for inspection", - "destinationAddresses": ["1.2.3.4"], - "destinationPorts": ["80"], - "name": "DNAT-HTTP-traffic-With-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["*"], - "translatedFqdn": "internalhttpserver", - "translatedPort": "880", - }, - ], - }, - } - ], - "networkRuleCollections": [ - { - "name": "netrulecoll", - "properties": { - "action": {"type": "Deny"}, - "priority": 112, - "rules": [ - { - "description": "Block traffic based on source IPs and ports", - "destinationAddresses": ["*"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic", - "protocols": ["TCP"], - "sourceAddresses": ["192.168.1.1-192.168.1.12", "10.1.4.12-10.1.4.255"], - }, - { - "description": "Block traffic based on source IPs and ports to amazon", - "destinationFqdns": ["www.amazon.com"], - "destinationPorts": ["443-444", "8443"], - "name": "L4-traffic-with-FQDN", - "protocols": ["TCP"], - "sourceAddresses": ["10.2.4.12-10.2.4.255"], - }, - ], - }, - } - ], - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "threatIntelMode": "Alert", - }, - "tags": {"key1": "value1"}, - "zones": ["1", "2", "3"], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8fd484d41f79..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_firewall_update_tags.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.azure_firewalls.begin_update_tags( - resource_group_name="azfwtest", - azure_firewall_name="fw1", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 197e50a8fe68..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_web_categories_list_by_subscription.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="4de8428a-4a92-4cea-90ff-b47128b8cab8", - ) - - response = client.web_categories.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c4939dee4c47..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python azure_web_category_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="4de8428a-4a92-4cea-90ff-b47128b8cab8", - ) - - response = client.web_categories.get( - name="Arts", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 70a5317f3bd1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_host_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="subid", - ) - - client.bastion_hosts.begin_delete( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/BastionHostDelete.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 deleted file mode 100644 index 096a83587818..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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/2023-02-01/examples/BastionHostGet.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 deleted file mode 100644 index f75f26d3de89..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_host_list_by_resource_group.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.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 804e69593f4c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_host_list_by_subscription.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.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 619141630808..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_host_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="subid", - ) - - response = client.bastion_hosts.begin_update_tags( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 30777b1495cb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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": { - "ipConfigurations": [ - { - "name": "bastionHostIpConfiguration", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" - }, - "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/2023-02-01/examples/BastionHostPut.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 deleted file mode 100644 index 539a0dfbc3d7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_session_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="subid", - ) - - response = client.disconnect_active_sessions( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - session_ids=["session1", "session2", "session3"], - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index afa6f7e00ee7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_sessions_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="subid", - ) - - response = client.begin_get_active_sessions( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - ).result() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7a68b3c9b3ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_shareable_link_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="subid", - ) - - response = client.begin_put_bastion_shareable_link( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - bsl_request={ - "vms": [ - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1" - } - }, - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2" - } - }, - ] - }, - ).result() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 44eedee7b25f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_shareable_link_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="subid", - ) - - client.begin_delete_bastion_shareable_link( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - bsl_request={ - "vms": [ - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1" - } - }, - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2" - } - }, - ] - }, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/BastionShareableLinkDelete.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 deleted file mode 100644 index ba0a0bdc5f3d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python bastion_shareable_link_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="subid", - ) - - response = client.get_bastion_shareable_link( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - bsl_request={ - "vms": [ - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1" - } - }, - { - "vm": { - "id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2" - } - }, - ] - }, - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a0fa23684256..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python check_dns_name_availability.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.check_dns_name_availability( - location="westus", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f664f7f990a8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python check_private_link_service_visibility.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.private_link_services.begin_check_private_link_service_visibility( - location="westus", - parameters={"privateLinkServiceAlias": "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b55214ac4347..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python check_private_link_service_visibility_by_resource_group.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.private_link_services.begin_check_private_link_service_visibility_by_resource_group( - location="westus", - resource_group_name="rg1", - parameters={"privateLinkServiceAlias": "mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a68ed63b4eff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_network_interface_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="subid", - ) - - response = client.network_interfaces.get_cloud_service_network_interface( - resource_group_name="rg1", - cloud_service_name="cs1", - role_instance_name="TestVMRole_IN_0", - network_interface_name="nic1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b2af05b7ace3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_network_interface_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="subid", - ) - - response = client.network_interfaces.list_cloud_service_network_interfaces( - resource_group_name="rg1", - cloud_service_name="cs1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 258974d75d36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_public_ip_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="subid", - ) - - response = client.public_ip_addresses.get_cloud_service_public_ip_address( - resource_group_name="cs-tester", - cloud_service_name="cs1", - role_instance_name="Test_VM_0", - network_interface_name="nic1", - ip_configuration_name="ip1", - public_ip_address_name="pub1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 688741ae22a4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_public_ip_list_all.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.public_ip_addresses.list_cloud_service_public_ip_addresses( - resource_group_name="cs-tester", - cloud_service_name="cs1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4300c2dd3cb8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_role_instance_network_interface_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="subid", - ) - - response = client.network_interfaces.list_cloud_service_role_instance_network_interfaces( - resource_group_name="rg1", - cloud_service_name="cs1", - role_instance_name="TestVMRole_IN_0", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4b98ac0900f0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_role_instance_public_ip_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="subid", - ) - - response = client.public_ip_addresses.list_cloud_service_role_instance_public_ip_addresses( - resource_group_name="cs-tester", - cloud_service_name="cs1", - role_instance_name="Test_VM_0", - network_interface_name="nic1", - ip_configuration_name="ip1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d7d5b40ef602..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_swap_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="subid", - ) - - response = client.vip_swap.get( - group_name="rg1", - resource_name="testCloudService", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 55fbddc70b6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_swap_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="subid", - ) - - response = client.vip_swap.list( - group_name="rg1", - resource_name="testCloudService", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8f0c97476564..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python cloud_service_swap_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="subid", - ) - - client.vip_swap.begin_create( - group_name="rg1", - resource_name="testCloudService", - parameters={"properties": {"slotType": "Production"}}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6746f390dd8e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python configuration_policy_group_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="subid", - ) - - client.configuration_policy_groups.begin_delete( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - configuration_policy_group_name="policyGroup1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c9da96f6529c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python configuration_policy_group_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="subid", - ) - - response = client.configuration_policy_groups.get( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - configuration_policy_group_name="policyGroup1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 67d9e6eca39f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python configuration_policy_group_list_by_vpn_server_configuration.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.configuration_policy_groups.list_by_vpn_server_configuration( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_put.py deleted file mode 100644 index 6126f1a5bc2f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_put.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python configuration_policy_group_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="subid", - ) - - response = client.configuration_policy_groups.begin_create_or_update( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - configuration_policy_group_name="policyGroup1", - vpn_server_configuration_policy_group_parameters={ - "properties": { - "isDefault": True, - "policyMembers": [ - {"attributeType": "RadiusAzureGroupId", "attributeValue": "6ad1bd08", "name": "policy1"}, - {"attributeType": "CertificateGroupId", "attributeValue": "red.com", "name": "policy2"}, - ], - "priority": 0, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/ConfigurationPolicyGroupPut.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 deleted file mode 100644 index 66bb47173c91..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_create_customized_values.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.custom_ip_prefixes.begin_create_or_update( - resource_group_name="rg1", - custom_ip_prefix_name="test-customipprefix", - parameters={"location": "westus", "properties": {"cidr": "0.0.0.0/24"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 85494cc89c93..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_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="subid", - ) - - client.custom_ip_prefixes.begin_delete( - resource_group_name="rg1", - custom_ip_prefix_name="test-customipprefix", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6e0f6a0e3b36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_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="subid", - ) - - response = client.custom_ip_prefixes.get( - resource_group_name="rg1", - custom_ip_prefix_name="test-customipprefix", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5c04893792d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_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="subid", - ) - - response = client.custom_ip_prefixes.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a7dc851276a1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_list_all.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.custom_ip_prefixes.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5a05a95cb242..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python custom_ip_prefix_update_tags.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.custom_ip_prefixes.update_tags( - resource_group_name="rg1", - custom_ip_prefix_name="test-customipprefix", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1ef479af5b42..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_custom_policy_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="subid", - ) - - response = client.ddos_custom_policies.begin_create_or_update( - resource_group_name="rg1", - ddos_custom_policy_name="test-ddos-custom-policy", - parameters={"location": "centraluseuap"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 133979b51e5e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_custom_policy_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="subid", - ) - - client.ddos_custom_policies.begin_delete( - resource_group_name="rg1", - ddos_custom_policy_name="test-ddos-custom-policy", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2c80305dc8a7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_custom_policy_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="subid", - ) - - response = client.ddos_custom_policies.get( - resource_group_name="rg1", - ddos_custom_policy_name="test-ddos-custom-policy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 41b857060ef1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_custom_policy_update_tags.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.ddos_custom_policies.update_tags( - resource_group_name="rg1", - ddos_custom_policy_name="test-ddos-custom-policy", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f9e2ee95ca35..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_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="subid", - ) - - response = client.ddos_protection_plans.begin_create_or_update( - resource_group_name="rg1", - ddos_protection_plan_name="test-plan", - parameters={"location": "westus", "properties": {}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 93421151d661..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_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="subid", - ) - - client.ddos_protection_plans.begin_delete( - resource_group_name="rg1", - ddos_protection_plan_name="test-plan", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 89633370a277..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_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="subid", - ) - - response = client.ddos_protection_plans.get( - resource_group_name="rg1", - ddos_protection_plan_name="test-plan", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b20865bb3411..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_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="subid", - ) - - response = client.ddos_protection_plans.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2062e2b4c170..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_list_all.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.ddos_protection_plans.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1cfbc517561f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ddos_protection_plan_update_tags.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.ddos_protection_plans.update_tags( - resource_group_name="rg1", - ddos_protection_plan_name="test-plan", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 691eac5dce3e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python default_security_rule_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="subid", - ) - - response = client.default_security_rules.get( - resource_group_name="testrg", - network_security_group_name="nsg1", - default_security_rule_name="AllowVnetInBound", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 32fc114debca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python default_security_rule_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="subid", - ) - - response = client.default_security_rules.list( - resource_group_name="testrg", - network_security_group_name="nsg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8adf2a728175..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python dscp_configuration_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="subid", - ) - - response = client.dscp_configuration.begin_create_or_update( - resource_group_name="rg1", - dscp_configuration_name="mydscpconfig", - parameters={ - "location": "eastus", - "properties": { - "qosDefinitionCollection": [ - { - "destinationIpRanges": [{"endIP": "127.0.10.2", "startIP": "127.0.10.1"}], - "destinationPortRanges": [{"end": 15, "start": 15}], - "markings": [1], - "protocol": "Tcp", - "sourceIpRanges": [{"endIP": "127.0.0.2", "startIP": "127.0.0.1"}], - "sourcePortRanges": [{"end": 11, "start": 10}, {"end": 21, "start": 20}], - }, - { - "destinationIpRanges": [{"endIP": "12.0.10.2", "startIP": "12.0.10.1"}], - "destinationPortRanges": [{"end": 52, "start": 51}], - "markings": [2], - "protocol": "Udp", - "sourceIpRanges": [{"endIP": "12.0.0.2", "startIP": "12.0.0.1"}], - "sourcePortRanges": [{"end": 12, "start": 11}], - }, - ] - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d22b878eea7d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python dscp_configuration_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="subid", - ) - - client.dscp_configuration.begin_delete( - resource_group_name="rg1", - dscp_configuration_name="mydscpConfig", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b6dc178fb561..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python dscp_configuration_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="subid", - ) - - response = client.dscp_configuration.get( - resource_group_name="rg1", - dscp_configuration_name="mydscpConfig", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1f460326ccb3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python dscp_configuration_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="subid", - ) - - response = client.dscp_configuration.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6e27a16f2593..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python dscp_configuration_list_all.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.dscp_configuration.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 612aa3b017f7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python effective_routes_list_for_connection.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_hubs.begin_get_effective_virtual_hub_routes( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 622559bb61ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python effective_routes_list_for_route_table.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_hubs.begin_get_effective_virtual_hub_routes( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d816cf02d850..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python effective_routes_list_for_virtual_hub.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_hubs.begin_get_effective_virtual_hub_routes( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c1e01faa50bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python endpoint_services_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="subid", - ) - - response = client.available_endpoint_services.list( - location="westus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 05ee352827b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_arp_table_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="subid", - ) - - response = client.express_route_circuits.begin_list_arp_table( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="peeringName", - device_path="devicePath", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c8241fe6854d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_authorization_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="subid", - ) - - response = client.express_route_circuit_authorizations.begin_create_or_update( - resource_group_name="rg1", - circuit_name="circuitName", - authorization_name="authorizatinName", - authorization_parameters={"properties": {}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 57b997b7e24c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_authorization_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="subid", - ) - - client.express_route_circuit_authorizations.begin_delete( - resource_group_name="rg1", - circuit_name="circuitName", - authorization_name="authorizationName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5d033ddabd7b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_authorization_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="subid", - ) - - response = client.express_route_circuit_authorizations.get( - resource_group_name="rg1", - circuit_name="circuitName", - authorization_name="authorizationName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f0ac274e8795..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_authorization_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="subid", - ) - - response = client.express_route_circuit_authorizations.list( - resource_group_name="rg1", - circuit_name="circuitName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 444106f30615..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_connection_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="subid1", - ) - - response = client.express_route_circuit_connections.begin_create_or_update( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - connection_name="circuitConnectionUSAUS", - express_route_circuit_connection_parameters={ - "properties": { - "addressPrefix": "10.0.0.0/29", - "authorizationKey": "946a1918-b7a2-4917-b43c-8c4cdaee006a", - "expressRouteCircuitPeering": { - "id": "/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering" - }, - "ipv6CircuitConnectionConfig": {"addressPrefix": "aa:bb::/125"}, - "peerExpressRouteCircuitPeering": { - "id": "/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering" - }, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c89e4e959b98..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_connection_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="subid", - ) - - client.express_route_circuit_connections.begin_delete( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - connection_name="circuitConnectionUSAUS", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e1181378ed73..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_connection_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="subid1", - ) - - response = client.express_route_circuit_connections.get( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - connection_name="circuitConnectionUSAUS", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 24e4847a9480..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_connection_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="subid1", - ) - - response = client.express_route_circuit_connections.list( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3e9dab7ae7b7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_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="subid", - ) - - response = client.express_route_circuits.begin_create_or_update( - resource_group_name="rg1", - circuit_name="circuitName", - parameters={ - "location": "Brazil South", - "properties": { - "allowClassicOperations": False, - "authorizations": [], - "peerings": [], - "serviceProviderProperties": { - "bandwidthInMbps": 200, - "peeringLocation": "Silicon Valley", - "serviceProviderName": "Equinix", - }, - }, - "sku": {"family": "MeteredData", "name": "Standard_MeteredData", "tier": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 87419951dde8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_create_on_express_route_port.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.express_route_circuits.begin_create_or_update( - resource_group_name="rg1", - circuit_name="expressRouteCircuit1", - parameters={ - "location": "westus", - "properties": { - "authorizationKey": "b0be57f5-1fba-463b-adec-ffe767354cdd", - "bandwidthInGbps": 10, - "expressRoutePort": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName" - }, - }, - "sku": {"family": "MeteredData", "name": "Premium_MeteredData", "tier": "Premium"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 75d8e2905e4b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_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="subid", - ) - - client.express_route_circuits.begin_delete( - resource_group_name="rg1", - circuit_name="circuitName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 454b4aed175a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_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="subid", - ) - - response = client.express_route_circuits.get( - resource_group_name="rg1", - circuit_name="circuitName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c91bf728ee7d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_list_by_resource_group.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.express_route_circuits.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ce0bfa308092..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_list_by_subscription.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.express_route_circuits.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 10a0515f4922..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_peering_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="subid", - ) - - response = client.express_route_circuit_peerings.begin_create_or_update( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="AzurePrivatePeering", - peering_parameters={ - "properties": { - "peerASN": 200, - "primaryPeerAddressPrefix": "192.168.16.252/30", - "secondaryPeerAddressPrefix": "192.168.18.252/30", - "vlanId": 200, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 25b5956d024c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_peering_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="subid", - ) - - client.express_route_circuit_peerings.begin_delete( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="peeringName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index aa0ad00f4602..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_peering_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="subid", - ) - - response = client.express_route_circuit_peerings.get( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="MicrosoftPeering", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e471329cdc0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_peering_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="subid", - ) - - response = client.express_route_circuit_peerings.list( - resource_group_name="rg1", - circuit_name="circuitName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f6bae12d7219..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_peering_stats.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.express_route_circuits.get_peering_stats( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="peeringName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1493077809e0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_route_table_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="subid", - ) - - response = client.express_route_circuits.begin_list_routes_table( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="peeringName", - device_path="devicePath", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7c722dd799d4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_route_table_summary_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="subid", - ) - - response = client.express_route_circuits.begin_list_routes_table_summary( - resource_group_name="rg1", - circuit_name="circuitName", - peering_name="peeringName", - device_path="devicePath", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 64844c4813d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_stats.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.express_route_circuits.get_stats( - resource_group_name="rg1", - circuit_name="circuitName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 94abb4e1ca3f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_circuit_update_tags.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.express_route_circuits.update_tags( - resource_group_name="ertest", - circuit_name="er1", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8233e9cf551a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_connection_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="subid", - ) - - response = client.express_route_connections.begin_create_or_update( - resource_group_name="resourceGroupName", - express_route_gateway_name="gateway-2", - connection_name="connectionName", - put_express_route_connection_parameters={ - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName", - "name": "connectionName", - "properties": { - "authorizationKey": "authorizationKey", - "expressRouteCircuitPeering": { - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering" - }, - "routingConfiguration": { - "associatedRouteTable": { - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1" - }, - "inboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1" - }, - "outboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2" - }, - "propagatedRouteTables": { - "ids": [ - { - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1" - }, - { - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2" - }, - { - "id": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3" - }, - ], - "labels": ["label1", "label2"], - }, - }, - "routingWeight": 2, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ce0b3646fb4a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_connection_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="subid", - ) - - client.express_route_connections.begin_delete( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - connection_name="connectionName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 13e7e9e96033..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_connection_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="subid", - ) - - response = client.express_route_connections.get( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - connection_name="connectionName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f0df1c4716df..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_connection_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="subid", - ) - - response = client.express_route_connections.list( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0f5deec57dcc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_bgp_peering_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="subid", - ) - - response = client.express_route_cross_connection_peerings.begin_create_or_update( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - peering_parameters={ - "properties": { - "ipv6PeeringConfig": { - "primaryPeerAddressPrefix": "3FFE:FFFF:0:CD30::/126", - "secondaryPeerAddressPrefix": "3FFE:FFFF:0:CD30::4/126", - }, - "peerASN": 200, - "primaryPeerAddressPrefix": "192.168.16.252/30", - "secondaryPeerAddressPrefix": "192.168.18.252/30", - "vlanId": 200, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 22b93cef4cf2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_bgp_peering_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="subid", - ) - - client.express_route_cross_connection_peerings.begin_delete( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f2381a15d149..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_bgp_peering_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="subid", - ) - - response = client.express_route_cross_connection_peerings.get( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6cfedca17bf1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_bgp_peering_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="subid", - ) - - response = client.express_route_cross_connection_peerings.list( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 95814268345a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_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="subid", - ) - - response = client.express_route_cross_connections.get( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index caaef28831ae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_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="subid", - ) - - response = client.express_route_cross_connections.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6a11e0333f8a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_list_by_resource_group.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.express_route_cross_connections.list_by_resource_group( - resource_group_name="CrossConnection-SiliconValley", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ba08638e1feb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_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="subid", - ) - - response = client.express_route_cross_connections.begin_create_or_update( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - parameters={"properties": {"serviceProviderProvisioningState": "NotProvisioned"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 08e74fb4a223..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connection_update_tags.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.express_route_cross_connections.update_tags( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - cross_connection_parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 64d5f6e582cc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connections_arp_table.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.express_route_cross_connections.begin_list_arp_table( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - device_path="primary", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dc79fcead1f5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connections_route_table.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.express_route_cross_connections.begin_list_routes_table( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - device_path="primary", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1af282721d92..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_cross_connections_route_table_summary.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.express_route_cross_connections.begin_list_routes_table_summary( - resource_group_name="CrossConnection-SiliconValley", - cross_connection_name="", - peering_name="AzurePrivatePeering", - device_path="primary", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 36c6efab6f3d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_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="subid", - ) - - response = client.express_route_gateways.begin_create_or_update( - resource_group_name="resourceGroupName", - express_route_gateway_name="gateway-2", - put_express_route_gateway_parameters={ - "location": "westus", - "properties": { - "allowNonVirtualWanTraffic": False, - "autoScaleConfiguration": {"bounds": {"min": 3}}, - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName" - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e1b3a9cde70d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_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="subid", - ) - - client.express_route_gateways.begin_delete( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 83b368d189ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_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="subid", - ) - - response = client.express_route_gateways.get( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 34c6139e89e1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_list_by_resource_group.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.express_route_gateways.list_by_resource_group( - resource_group_name="resourceGroupName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index da0efafe2ca4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_list_by_subscription.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.express_route_gateways.list_by_subscription() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 33ed6293fd3d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_gateway_update_tags.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.express_route_gateways.begin_update_tags( - resource_group_name="resourceGroupName", - express_route_gateway_name="expressRouteGatewayName", - express_route_gateway_parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9eca02ff3e31..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_link_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="subid", - ) - - response = client.express_route_links.get( - resource_group_name="rg1", - express_route_port_name="portName", - link_name="linkName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7844098cb412..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_link_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="subid", - ) - - response = client.express_route_links.list( - resource_group_name="rg1", - express_route_port_name="portName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 31a9623e4506..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_authorization_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="subid", - ) - - response = client.express_route_port_authorizations.begin_create_or_update( - resource_group_name="rg1", - express_route_port_name="expressRoutePortName", - authorization_name="authorizatinName", - authorization_parameters={"properties": {}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a8b3ff8158fc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_authorization_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="subid", - ) - - client.express_route_port_authorizations.begin_delete( - resource_group_name="rg1", - express_route_port_name="expressRoutePortName", - authorization_name="authorizationName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 349ad9789b39..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_authorization_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="subid", - ) - - response = client.express_route_port_authorizations.get( - resource_group_name="rg1", - express_route_port_name="expressRoutePortName", - authorization_name="authorizationName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1fd9551bc251..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_authorization_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="subid", - ) - - response = client.express_route_port_authorizations.list( - resource_group_name="rg1", - express_route_port_name="expressRoutePortName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e250e7bf1ca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_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="subid", - ) - - response = client.express_route_ports.begin_create_or_update( - resource_group_name="rg1", - express_route_port_name="portName", - parameters={ - "location": "westus", - "properties": { - "bandwidthInGbps": 100, - "billingType": "UnlimitedData", - "encapsulation": "QinQ", - "peeringLocation": "peeringLocationName", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f222653699b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_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="subid", - ) - - client.express_route_ports.begin_delete( - resource_group_name="rg1", - express_route_port_name="portName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7764edab3022..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_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="subid", - ) - - response = client.express_route_ports.get( - resource_group_name="rg1", - express_route_port_name="portName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b5176591ad06..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_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="subid", - ) - - response = client.express_route_ports.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d54981510b45..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_list_by_resource_group.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.express_route_ports.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cf72e77b9f95..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_update_link.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.express_route_ports.begin_create_or_update( - resource_group_name="rg1", - express_route_port_name="portName", - parameters={ - "location": "westus", - "properties": { - "bandwidthInGbps": 100, - "billingType": "UnlimitedData", - "encapsulation": "QinQ", - "links": [{"name": "link1", "properties": {"adminState": "Enabled"}}], - "peeringLocation": "peeringLocationName", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8a3486bf509c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_port_update_tags.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.express_route_ports.update_tags( - resource_group_name="rg1", - express_route_port_name="portName", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 959a9f68ddb8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_ports_location_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="subid", - ) - - response = client.express_route_ports_locations.get( - location_name="locationName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 28451a8f258f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_ports_location_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="subid", - ) - - response = client.express_route_ports_locations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5f84d28cc744..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_provider_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="subid", - ) - - response = client.express_route_service_providers.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a4b32acd28f8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_provider_port.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.express_route_provider_port( - providerport="abc", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 99728627b763..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python express_route_provider_port_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="subid", - ) - - response = client.express_route_provider_ports_location.list() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5120f47a91d1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_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="subid", - ) - - client.firewall_policies.begin_delete( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/FirewallPolicyDelete.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 deleted file mode 100644 index 0ccceac31504..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_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="subid", - ) - - response = client.firewall_policies.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2e25fc417153..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_list_by_resource_group.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.firewall_policies.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1b88618a45f5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_list_by_subscription.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.firewall_policies.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c01ee0f17ba1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_nat_rule_collection_group_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 61af84de4a36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_nat_rule_collection_group_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - parameters={ - "properties": { - "priority": 100, - "ruleCollections": [ - { - "action": {"type": "DNAT"}, - "name": "Example-Nat-Rule-Collection", - "priority": 100, - "ruleCollectionType": "FirewallPolicyNatRuleCollection", - "rules": [ - { - "destinationAddresses": ["152.23.32.23"], - "destinationPorts": ["8080"], - "ipProtocols": ["TCP", "UDP"], - "name": "nat-rule1", - "ruleType": "NatRule", - "sourceAddresses": ["2.2.2.2"], - "sourceIpGroups": [], - "translatedFqdn": "internalhttp.server.net", - "translatedPort": "8080", - } - ], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3f65d7f9deaf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_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="subId", - ) - - response = client.firewall_policies.update_tags( - resource_group_name="myResourceGroup", - firewall_policy_name="firewallPolicy", - parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d0aab071c0a8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_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="subid", - ) - - response = client.firewall_policies.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={ - "location": "West US", - "properties": { - "dnsSettings": {"enableProxy": True, "requireProxyForNetworkRules": False, "servers": ["30.3.4.5"]}, - "explicitProxy": { - "enableExplicitProxy": True, - "enablePacFile": True, - "httpPort": 8087, - "httpsPort": 8087, - "pacFile": "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D", - "pacFilePort": 8087, - }, - "insights": { - "isEnabled": True, - "logAnalyticsResources": { - "defaultWorkspaceId": { - "id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace" - }, - "workspaces": [ - { - "region": "westus", - "workspaceId": { - "id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1" - }, - }, - { - "region": "eastus", - "workspaceId": { - "id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2" - }, - }, - ], - }, - "retentionDays": 100, - }, - "intrusionDetection": { - "configuration": { - "bypassTrafficSettings": [ - { - "description": "Rule 1", - "destinationAddresses": ["5.6.7.8"], - "destinationPorts": ["*"], - "name": "bypassRule1", - "protocol": "TCP", - "sourceAddresses": ["1.2.3.4"], - } - ], - "signatureOverrides": [{"id": "2525004", "mode": "Deny"}], - }, - "mode": "Alert", - }, - "sku": {"tier": "Premium"}, - "snat": {"privateRanges": ["IANAPrivateRanges"]}, - "sql": {"allowSqlRedirect": True}, - "threatIntelMode": "Alert", - "threatIntelWhitelist": {"fqdns": ["*.microsoft.com"], "ipAddresses": ["20.3.4.5"]}, - "transportSecurity": { - "certificateAuthority": {"keyVaultSecretId": "https://kv/secret", "name": "clientcert"} - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4394710a3c19..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_query_signature_overrides.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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={ - "filters": [{"field": "Mode", "values": ["Deny"]}], - "orderBy": {"field": "severity", "order": "Ascending"}, - "resultsPerPage": 20, - "search": "", - "skip": 0, - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b5380c6ec547..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_query_signature_overrides_filter_values.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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures_filter_values.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={"filterName": "severity"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 892e35a39257..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_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="subid", - ) - - client.firewall_policy_rule_collection_groups.begin_delete( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/FirewallPolicyRuleCollectionGroupDelete.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 deleted file mode 100644 index ef6399136bb9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0883dcc1bb6c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index aa3f1ade6d54..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - parameters={ - "properties": { - "priority": 100, - "ruleCollections": [ - { - "action": {"type": "Deny"}, - "name": "Example-Filter-Rule-Collection", - "priority": 100, - "ruleCollectionType": "FirewallPolicyFilterRuleCollection", - "rules": [ - { - "destinationAddresses": ["*"], - "destinationPorts": ["*"], - "ipProtocols": ["TCP"], - "name": "network-rule1", - "ruleType": "NetworkRule", - "sourceAddresses": ["10.1.25.0/24"], - } - ], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8c151cab7134..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_http_headers_to_insert.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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_rule_collection_groups.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - parameters={ - "properties": { - "priority": 110, - "ruleCollections": [ - { - "action": {"type": "Allow"}, - "name": "Example-Filter-Rule-Collection", - "ruleCollectionType": "FirewallPolicyFilterRuleCollection", - "rules": [ - { - "description": "Insert HTTP header rule", - "fqdnTags": ["WindowsVirtualDesktop"], - "httpHeadersToInsert": [ - { - "headerName": "Restrict-Access-To-Tenants", - "headerValue": "contoso.com,fabrikam.onmicrosoft.com", - } - ], - "name": "rule1", - "protocols": [{"port": 80, "protocolType": "Http"}], - "ruleType": "ApplicationRule", - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - } - ], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c614ac28e828..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_ip_groups_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleGroup1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 75c97457c7e9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_ip_groups_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 22b8c6f8741d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_ip_groups_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="subid", - ) - - response = client.firewall_policy_rule_collection_groups.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - parameters={ - "properties": { - "priority": 110, - "ruleCollections": [ - { - "action": {"type": "Deny"}, - "name": "Example-Filter-Rule-Collection", - "ruleCollectionType": "FirewallPolicyFilterRuleCollection", - "rules": [ - { - "destinationIpGroups": [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2" - ], - "destinationPorts": ["*"], - "ipProtocols": ["TCP"], - "name": "network-1", - "ruleType": "NetworkRule", - "sourceIpGroups": [ - "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1" - ], - } - ], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 72c9e1145aa1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_web_categories_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_rule_collection_groups.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1a81d6109a1e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_web_categories_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_rule_collection_groups.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b99c462889f3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_rule_collection_group_with_web_categories_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_rule_collection_groups.begin_create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - parameters={ - "properties": { - "priority": 110, - "ruleCollections": [ - { - "action": {"type": "Deny"}, - "name": "Example-Filter-Rule-Collection", - "ruleCollectionType": "FirewallPolicyFilterRuleCollection", - "rules": [ - { - "description": "Deny inbound rule", - "name": "rule1", - "protocols": [{"port": 443, "protocolType": "Https"}], - "ruleType": "ApplicationRule", - "sourceAddresses": ["216.58.216.164", "10.0.0.0/24"], - "webCategories": ["Hacking"], - } - ], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 82618a485999..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_signature_overrides_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures_overrides.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f708a9034997..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_signature_overrides_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures_overrides.list( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a78507336edf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_signature_overrides_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures_overrides.patch( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={ - "id": "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - "name": "default", - "properties": {"signatures": {"2000105": "Off", "2000106": "Deny"}}, - "type": "Microsoft.Network/firewallPolicies/signatureOverrides", - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 411058bb404d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python firewall_policy_signature_overrides_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="e747cc13-97d4-4a79-b463-42d7f4e558f2", - ) - - response = client.firewall_policy_idps_signatures_overrides.put( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={ - "id": "/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default", - "name": "default", - "properties": {"signatures": {"2000105": "Off", "2000106": "Deny"}}, - "type": "Microsoft.Network/firewallPolicies/signatureOverrides", - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6d4ff32eb626..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python generate_express_route_ports_loa.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.express_route_ports.generate_loa( - resource_group_name="rg1", - express_route_port_name="portName", - request={"customerName": "customerName"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8a624f8b9a52..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python generate_virtual_wan_vpn_server_configuration_vpn_profile.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.begin_generatevirtualwanvpnserverconfigurationvpnprofile( - resource_group_name="rg1", - virtual_wan_name="wan1", - vpn_client_params={ - "authenticationMethod": "EAPTLS", - "vpnServerConfigurationResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index aff9f7b2a559..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python get_application_gateway_waf_dynamic_manifests.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.application_gateway_waf_dynamic_manifests.get( - location="westus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e894549c9c99..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python get_application_gateway_waf_dynamic_manifests_default.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.application_gateway_waf_dynamic_manifests_default.get( - location="westus", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dd949655fd22..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python get_inbound_routes.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_hubs.begin_get_inbound_routes( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - get_inbound_routes_parameters={ - "connectionType": "ExpressRouteConnection", - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 801e7e2ec285..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python get_outbound_routes.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_hubs.begin_get_outbound_routes( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - get_outbound_routes_parameters={ - "connectionType": "ExpressRouteConnection", - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3d3037f14c3b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python get_virtual_wan_vpn_server_configurations.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.vpn_server_configurations_associated_with_virtual_wan.begin_list( - resource_group_name="rg1", - virtual_wan_name="wan1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8c82bd10a52a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_route_table_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="subid", - ) - - client.hub_route_tables.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="hubRouteTable1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ae496591b0ea..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_route_table_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="subid", - ) - - response = client.hub_route_tables.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="hubRouteTable1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a0ad74ff6beb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_route_table_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="subid", - ) - - response = client.hub_route_tables.list( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 555b959c9e47..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_route_table_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="subid", - ) - - response = client.hub_route_tables.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="hubRouteTable1", - route_table_parameters={ - "properties": { - "labels": ["label1", "label2"], - "routes": [ - { - "destinationType": "CIDR", - "destinations": ["10.0.0.0/8", "20.0.0.0/8", "30.0.0.0/8"], - "name": "route1", - "nextHop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1", - "nextHopType": "ResourceId", - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 962e0f7de2a7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_virtual_network_connection_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="subid", - ) - - client.hub_virtual_network_connections.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - connection_name="connection1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7682af96765b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_virtual_network_connection_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="subid", - ) - - response = client.hub_virtual_network_connections.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - connection_name="connection1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1a4a33d10ae7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_virtual_network_connection_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="subid", - ) - - response = client.hub_virtual_network_connections.list( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 35081fdb190d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python hub_virtual_network_connection_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="subid", - ) - - response = client.hub_virtual_network_connections.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - connection_name="connection1", - hub_virtual_network_connection_parameters={ - "properties": { - "enableInternetSecurity": False, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1" - }, - "routingConfiguration": { - "associatedRouteTable": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - }, - "inboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1" - }, - "outboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2" - }, - "propagatedRouteTables": { - "ids": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - } - ], - "labels": ["label1", "label2"], - }, - "vnetRoutes": { - "staticRoutes": [ - { - "addressPrefixes": ["10.1.0.0/16", "10.2.0.0/16"], - "name": "route1", - "nextHopIpAddress": "10.0.0.68", - }, - { - "addressPrefixes": ["10.3.0.0/16", "10.4.0.0/16"], - "name": "route2", - "nextHopIpAddress": "10.0.0.65", - }, - ], - "staticRoutesConfig": {"vnetLocalRouteOverrideCriteria": "Equal"}, - }, - }, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5aef71522823..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python inbound_nat_rule_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="subid", - ) - - response = client.inbound_nat_rules.begin_create_or_update( - resource_group_name="testrg", - load_balancer_name="lb1", - inbound_nat_rule_name="natRule1.1", - inbound_nat_rule_parameters={ - "properties": { - "backendPort": 3389, - "enableFloatingIP": False, - "enableTcpReset": False, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1" - }, - "frontendPort": 3390, - "idleTimeoutInMinutes": 4, - "protocol": "Tcp", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 370de64e1c66..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python inbound_nat_rule_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="subid", - ) - - client.inbound_nat_rules.begin_delete( - resource_group_name="testrg", - load_balancer_name="lb1", - inbound_nat_rule_name="natRule1.1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index beeae7597be0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python inbound_nat_rule_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="subid", - ) - - response = client.inbound_nat_rules.get( - resource_group_name="testrg", - load_balancer_name="lb1", - inbound_nat_rule_name="natRule1.1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bb07bdbb8c1e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python inbound_nat_rule_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="subid", - ) - - response = client.inbound_nat_rules.list( - resource_group_name="testrg", - load_balancer_name="lb1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/InboundNatRuleList.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 deleted file mode 100644 index 2e889444bb6b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python inbound_security_rule_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="subid", - ) - - response = client.inbound_security_rule.begin_create_or_update( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - rule_collection_name="rule1", - parameters={ - "properties": { - "rules": [{"destinationPortRange": 22, "protocol": "TCP", "sourceAddressPrefix": "50.20.121.5/32"}] - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5568a1039d3f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_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="subid", - ) - - response = client.ip_allocations.begin_create_or_update( - resource_group_name="rg1", - ip_allocation_name="test-ipallocation", - parameters={ - "location": "centraluseuap", - "properties": { - "allocationTags": { - "VNetID": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1" - }, - "prefix": "3.2.5.0/24", - "type": "Hypernet", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5ace4992844b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_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="subid", - ) - - client.ip_allocations.begin_delete( - resource_group_name="rg1", - ip_allocation_name="test-ipallocation", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a3bac114f265..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_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="subid", - ) - - response = client.ip_allocations.get( - resource_group_name="rg1", - ip_allocation_name="test-ipallocation", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8d1da82b46ec..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_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="subid", - ) - - response = client.ip_allocations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a36fff9a4bbc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_list_by_resource_group.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.ip_allocations.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5c0558daceef..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_allocation_update_tags.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.ip_allocations.update_tags( - resource_group_name="rg1", - ip_allocation_name="test-ipallocation", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2eef3d86785f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_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="subId", - ) - - response = client.ip_groups.begin_create_or_update( - resource_group_name="myResourceGroup", - ip_groups_name="ipGroups1", - parameters={ - "location": "West US", - "properties": {"ipAddresses": ["13.64.39.16/32", "40.74.146.80/31", "40.74.147.32/28"]}, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 09be44d7d2af..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_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="subId", - ) - - client.ip_groups.begin_delete( - resource_group_name="myResourceGroup", - ip_groups_name="ipGroups1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bb8e05fe90af..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_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="subId", - ) - - response = client.ip_groups.get( - resource_group_name="myResourceGroup", - ip_groups_name="ipGroups1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 720569700644..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_list_by_resource_group.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.ip_groups.list_by_resource_group( - resource_group_name="myResourceGroup", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fce2003f60d3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_list_by_subscription.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.ip_groups.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0f7e4c585111..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python ip_groups_update_tags.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.ip_groups.update_groups( - resource_group_name="myResourceGroup", - ip_groups_name="ipGroups1", - parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/IpGroupsUpdateTags.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 deleted file mode 100644 index 9735fc000526..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python lb_backend_address_pool_list_with_backend_addresses_pool_type.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_backend_address_pools.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b231a32d7b57..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python lb_backend_address_pool_with_backend_addresses_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="subid", - ) - - response = client.load_balancer_backend_address_pools.get( - resource_group_name="testrg", - load_balancer_name="lb", - backend_address_pool_name="backend", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a76e04d13544..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python lb_backend_address_pool_with_backend_addresses_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="subid", - ) - - response = client.load_balancer_backend_address_pools.begin_create_or_update( - resource_group_name="testrg", - load_balancer_name="lb", - backend_address_pool_name="backend", - parameters={ - "properties": { - "loadBalancerBackendAddresses": [ - { - "name": "address1", - "properties": { - "ipAddress": "10.0.0.4", - "virtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb" - }, - }, - }, - { - "name": "address2", - "properties": { - "ipAddress": "10.0.0.5", - "virtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb" - }, - }, - }, - ] - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9664b03e5c26..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_backend_address_pool_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="subid", - ) - - client.load_balancer_backend_address_pools.begin_delete( - resource_group_name="testrg", - load_balancer_name="lb", - backend_address_pool_name="backend", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cf638b18057b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_backend_address_pool_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="subid", - ) - - response = client.load_balancer_backend_address_pools.get( - resource_group_name="testrg", - load_balancer_name="lb", - backend_address_pool_name="backend", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2b92bf2adb8b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_backend_address_pool_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="subid", - ) - - response = client.load_balancer_backend_address_pools.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c83da3318921..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_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="subid", - ) - - response = client.load_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - } - ], - "inboundNatPools": [], - "inboundNatRules": [ - { - "name": "in-nat-rule", - "properties": { - "backendPort": 3389, - "enableFloatingIP": True, - "enableTcpReset": False, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 3389, - "idleTimeoutInMinutes": 15, - "protocol": "Tcp", - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "enableFloatingIP": True, - "enableTcpReset": False, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e576306e9b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_gateway_load_balancer_consumer.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_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "gatewayLoadBalancer": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - }, - }, - } - ], - "inboundNatPools": [], - "inboundNatRules": [ - { - "name": "in-nat-rule", - "properties": { - "backendPort": 3389, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 3389, - "idleTimeoutInMinutes": 15, - "protocol": "Tcp", - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "outboundRules": [], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c4b308134520..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_gateway_load_balancer_provider_with_one_backend_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.load_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [ - { - "name": "be-lb", - "properties": { - "tunnelInterfaces": [ - {"identifier": 900, "port": 15000, "protocol": "VXLAN", "type": "Internal"}, - {"identifier": 901, "port": 15001, "protocol": "VXLAN", "type": "Internal"}, - ] - }, - } - ], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - } - ], - "inboundNatPools": [], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPools": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - } - ], - "backendPort": 0, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 0, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "All", - }, - } - ], - "outboundRules": [], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Premium"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0def7c3daec8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_gateway_load_balancer_provider_with_two_backend_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.load_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb1", "properties": {}}, {"name": "be-lb2", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - } - ], - "inboundNatPools": [], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": {}, - "backendAddressPools": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1" - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2" - }, - ], - "backendPort": 0, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 0, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "All", - }, - } - ], - "outboundRules": [], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Premium"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e5132fd692b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_global_tier.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_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [ - { - "name": "be-lb", - "properties": { - "loadBalancerBackendAddresses": [ - { - "name": "regional-lb1-address", - "properties": { - "loadBalancerFrontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb" - } - }, - } - ] - }, - } - ], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "enableFloatingIP": False, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Standard", "tier": "Global"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f1b6d65dab6e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_standard_sku.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_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - } - ], - "inboundNatPools": [], - "inboundNatRules": [ - { - "name": "in-nat-rule", - "properties": { - "backendPort": 3389, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 3389, - "idleTimeoutInMinutes": 15, - "protocol": "Tcp", - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "outboundRules": [], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2d24394fa4d8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_with_inbound_nat_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.load_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [], - "frontendIPConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test", - "name": "test", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet" - }, - }, - "zones": [], - } - ], - "inboundNatPools": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test", - "name": "test", - "properties": { - "backendPort": 8888, - "enableFloatingIP": True, - "enableTcpReset": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test" - }, - "frontendPortRangeEnd": 8085, - "frontendPortRangeStart": 8080, - "idleTimeoutInMinutes": 10, - "protocol": "Tcp", - }, - } - ], - "inboundNatRules": [], - "loadBalancingRules": [], - "outboundRules": [], - "probes": [], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cc2290d9d184..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_with_outbound_rules.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_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip" - } - }, - } - ], - "inboundNatPools": [], - "inboundNatRules": [ - { - "name": "in-nat-rule", - "properties": { - "backendPort": 3389, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 3389, - "idleTimeoutInMinutes": 15, - "protocol": "Tcp", - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "disableOutboundSnat": True, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "outboundRules": [ - { - "name": "rule1", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "frontendIPConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - } - ], - "protocol": "All", - }, - } - ], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/LoadBalancerCreateWithOutboundRules.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 deleted file mode 100644 index aab61fdb4ddb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_create_with_zones.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_balancers.begin_create_or_update( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={ - "location": "eastus", - "properties": { - "backendAddressPools": [{"name": "be-lb", "properties": {}}], - "frontendIPConfigurations": [ - { - "name": "fe-lb", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - } - }, - "zones": ["1"], - } - ], - "inboundNatPools": [], - "inboundNatRules": [ - { - "name": "in-nat-rule", - "properties": { - "backendPort": 3389, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 3389, - "idleTimeoutInMinutes": 15, - "protocol": "Tcp", - }, - } - ], - "loadBalancingRules": [ - { - "name": "rulelb", - "properties": { - "backendAddressPool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb" - }, - "backendPort": 80, - "enableFloatingIP": True, - "frontendIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 15, - "loadDistribution": "Default", - "probe": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb" - }, - "protocol": "Tcp", - }, - } - ], - "outboundRules": [], - "probes": [ - { - "name": "probe-lb", - "properties": { - "intervalInSeconds": 15, - "numberOfProbes": 2, - "port": 80, - "probeThreshold": 1, - "protocol": "Http", - "requestPath": "healthcheck.aspx", - }, - } - ], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0346f7a7aaa2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_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="subid", - ) - - client.load_balancers.begin_delete( - resource_group_name="rg1", - load_balancer_name="lb", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1fede4a98afd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_frontend_ip_configuration_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="subid", - ) - - response = client.load_balancer_frontend_ip_configurations.get( - resource_group_name="testrg", - load_balancer_name="lb", - frontend_ip_configuration_name="frontend", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8fd8cb41811d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_frontend_ip_configuration_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="subid", - ) - - response = client.load_balancer_frontend_ip_configurations.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1b70f6510069..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_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="subid", - ) - - response = client.load_balancers.get( - resource_group_name="rg1", - load_balancer_name="lb", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c2dbf44b4ef2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_get_inbound_nat_rule_port_mapping.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_balancers.get( - resource_group_name="rg1", - load_balancer_name="lb", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/LoadBalancerGetInboundNatRulePortMapping.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 deleted file mode 100644 index 53d0d6b7cdf7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_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="subid", - ) - - response = client.load_balancers.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 79ae7389fce5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_list_all.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_balancers.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 87d020b799e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_load_balancing_rule_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="subid", - ) - - response = client.load_balancer_load_balancing_rules.get( - resource_group_name="testrg", - load_balancer_name="lb1", - load_balancing_rule_name="rule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c6bcad92726c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_load_balancing_rule_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="subid", - ) - - response = client.load_balancer_load_balancing_rules.list( - resource_group_name="testrg", - load_balancer_name="lb1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 42f15e07ba80..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_network_interface_list_simple.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_network_interfaces.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3711190db438..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_network_interface_list_vmss.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_network_interfaces.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e72b88e56a8b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_outbound_rule_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="subid", - ) - - response = client.load_balancer_outbound_rules.get( - resource_group_name="testrg", - load_balancer_name="lb1", - outbound_rule_name="rule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bcc84758011b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_outbound_rule_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="subid", - ) - - response = client.load_balancer_outbound_rules.list( - resource_group_name="testrg", - load_balancer_name="lb1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f86b09f8da09..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_probe_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="subid", - ) - - response = client.load_balancer_probes.get( - resource_group_name="testrg", - load_balancer_name="lb", - probe_name="probe1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4d9ce4650a2e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_probe_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="subid", - ) - - response = client.load_balancer_probes.list( - resource_group_name="testrg", - load_balancer_name="lb", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 27b055cb8e82..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancer_update_tags.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_balancers.update_tags( - resource_group_name="rg1", - load_balancer_name="lb", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9af863e69afa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python load_balancers_swap_public_ip_addresses.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", - ) - - client.load_balancers.begin_swap_public_ip_addresses( - location="westus", - parameters={ - "frontendIPConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2" - } - }, - }, - { - "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1" - } - }, - }, - ] - }, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c8c198b68a50..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python local_network_gateway_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="subid", - ) - - response = client.local_network_gateways.begin_create_or_update( - resource_group_name="rg1", - local_network_gateway_name="localgw", - parameters={ - "location": "Central US", - "properties": { - "fqdn": "site1.contoso.com", - "gatewayIpAddress": "11.12.13.14", - "localNetworkAddressSpace": {"addressPrefixes": ["10.1.0.0/16"]}, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1016b5dc789f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python local_network_gateway_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="subid", - ) - - client.local_network_gateways.begin_delete( - resource_group_name="rg1", - local_network_gateway_name="localgw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2e91a2fb8b26..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python local_network_gateway_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="subid", - ) - - response = client.local_network_gateways.get( - resource_group_name="rg1", - local_network_gateway_name="localgw", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0ab17e163d21..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python local_network_gateway_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="subid", - ) - - response = client.local_network_gateways.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3ac4a22d549a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python local_network_gateway_update_tags.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.local_network_gateways.update_tags( - resource_group_name="rg1", - local_network_gateway_name="lgw", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/LocalNetworkGatewayUpdateTags.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 deleted file mode 100644 index 9056bc993617..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_create_or_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="subid", - ) - - response = client.nat_gateways.begin_create_or_update( - resource_group_name="rg1", - nat_gateway_name="test-natgateway", - parameters={ - "location": "westus", - "properties": { - "publicIpAddresses": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" - } - ], - "publicIpPrefixes": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" - } - ], - }, - "sku": {"name": "Standard"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6d0452140874..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_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="subid", - ) - - client.nat_gateways.begin_delete( - resource_group_name="rg1", - nat_gateway_name="test-natGateway", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5ff33c63a1ca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_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="subid", - ) - - response = client.nat_gateways.get( - resource_group_name="rg1", - nat_gateway_name="test-natGateway", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index db6a23ebbda4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_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="subid", - ) - - response = client.nat_gateways.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index afb58471c8a5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_list_all.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.nat_gateways.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 89357213aa0f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_gateway_update_tags.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.nat_gateways.update_tags( - resource_group_name="rg1", - nat_gateway_name="test-natGateway", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f9aafe6feb8e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_rule_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="subid", - ) - - client.nat_rules.begin_delete( - resource_group_name="rg1", - gateway_name="gateway1", - nat_rule_name="natRule1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 126a508efb34..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_rule_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="subid", - ) - - response = client.nat_rules.get( - resource_group_name="rg1", - gateway_name="gateway1", - nat_rule_name="natRule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 68fcff9b713a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_rule_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="subid", - ) - - response = client.nat_rules.list_by_vpn_gateway( - resource_group_name="rg1", - gateway_name="gateway1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NatRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_put.py deleted file mode 100644 index bc40b3a6d0ce..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_put.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python nat_rule_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="subid", - ) - - response = client.nat_rules.begin_create_or_update( - resource_group_name="rg1", - gateway_name="gateway1", - nat_rule_name="natRule1", - nat_rule_parameters={ - "properties": { - "externalMappings": [{"addressSpace": "192.168.21.0/24"}], - "internalMappings": [{"addressSpace": "10.4.0.0/24"}], - "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", - "mode": "EgressSnat", - "type": "Static", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NatRulePut.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 deleted file mode 100644 index 9fea1b335e7d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_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="subid", - ) - - response = client.network_interfaces.begin_create_or_update( - resource_group_name="rg1", - network_interface_name="test-nic", - parameters={ - "location": "eastus", - "properties": { - "disableTcpStateTracking": True, - "enableAcceleratedNetworking": True, - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default" - }, - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 20b27b4ccd6d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_create_gateway_load_balancer_consumer.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.network_interfaces.begin_create_or_update( - resource_group_name="rg1", - network_interface_name="test-nic", - parameters={ - "location": "eastus", - "properties": { - "enableAcceleratedNetworking": True, - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "gatewayLoadBalancer": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider" - }, - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default" - }, - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 806a6628abe5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_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="subid", - ) - - client.network_interfaces.begin_delete( - resource_group_name="rg1", - network_interface_name="test-nic", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5e7d20dd8d90..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_effective_nsg_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="subid", - ) - - response = client.network_interfaces.begin_list_effective_network_security_groups( - resource_group_name="rg1", - network_interface_name="nic1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index eb063c2295d3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_effective_route_table_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="subid", - ) - - response = client.network_interfaces.begin_get_effective_route_table( - resource_group_name="rg1", - network_interface_name="nic1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dfe5c3c037d9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_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="subid", - ) - - response = client.network_interfaces.get( - resource_group_name="rg1", - network_interface_name="test-nic", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0d48189a01b4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_ip_configuration_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="subid", - ) - - response = client.network_interface_ip_configurations.get( - resource_group_name="testrg", - network_interface_name="mynic", - ip_configuration_name="ipconfig1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2f4c29197c40..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_ip_configuration_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="subid", - ) - - response = client.network_interface_ip_configurations.list( - resource_group_name="testrg", - network_interface_name="nic1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ce2f1f214d97..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_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="subid", - ) - - response = client.network_interfaces.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5808c4d0c136..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_list_all.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.network_interfaces.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 05fc721b1921..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_load_balancer_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="subid", - ) - - response = client.network_interface_load_balancers.list( - resource_group_name="testrg", - network_interface_name="nic1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1e7c33235fdb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_tap_configuration_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="subid", - ) - - response = client.network_interface_tap_configurations.begin_create_or_update( - resource_group_name="testrg", - network_interface_name="mynic", - tap_configuration_name="tapconfiguration1", - tap_configuration_parameters={ - "properties": { - "virtualNetworkTap": { - "id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap" - } - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 05d669ca35cf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_tap_configuration_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="subid", - ) - - client.network_interface_tap_configurations.begin_delete( - resource_group_name="rg1", - network_interface_name="test-networkinterface", - tap_configuration_name="test-tapconfiguration", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 744da0b37016..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_tap_configuration_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="subid", - ) - - response = client.network_interface_tap_configurations.get( - resource_group_name="testrg", - network_interface_name="mynic", - tap_configuration_name="tapconfiguration1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 606c6b9ff64a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_tap_configuration_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="subid", - ) - - response = client.network_interface_tap_configurations.list( - resource_group_name="rg1", - network_interface_name="mynic", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6dddd79aec74..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_interface_update_tags.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.network_interfaces.update_tags( - resource_group_name="rg1", - network_interface_name="test-nic", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a46b81f54515..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_active_connectivity_configurations_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.list_active_connectivity_configurations( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - parameters={"regions": ["westus"], "skipToken": "fakeSkipTokenCode"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6b56697d51b8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_active_security_admin_rules_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.list_active_security_admin_rules( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - parameters={"regions": ["westus"], "skipToken": "fakeSkipTokenCode"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 862e79f4b034..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_collection_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.admin_rule_collections.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3194da4f2844..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_collection_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.admin_rule_collections.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b4664ac18f1e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_collection_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.admin_rule_collections.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 45f51e64995e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_collection_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.admin_rule_collections.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_collection={ - "properties": { - "appliesToGroups": [ - { - "networkGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup" - } - ], - "description": "A sample policy", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4ba92063204b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.admin_rules.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleAdminRule", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a9f174fd5d58..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.admin_rules.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleAdminRule", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 305476ba3031..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.admin_rules.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fb200fcc7e27..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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": "*", "addressPrefixType": "IPPrefix"}], - "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/2023-02-01/examples/NetworkManagerAdminRulePut.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 deleted file mode 100644 index e6c0681e956e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_commit_post.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.network_manager_commits.begin_post( - resource_group_name="resoureGroupSample", - network_manager_name="testNetworkManager", - parameters={ - "commitType": "SecurityAdmin", - "configurationIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig" - ], - "targetLocations": ["useast"], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3df4c1f859e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_management_group_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="SUBSCRIPTION_ID", - ) - - client.management_group_network_manager_connections.delete( - management_group_id="managementGroupA", - network_manager_connection_name="TestNMConnection", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2bd06e9907bb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_management_group_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="SUBSCRIPTION_ID", - ) - - response = client.management_group_network_manager_connections.get( - management_group_id="managementGroupA", - network_manager_connection_name="TestNMConnection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 05b0a36544eb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_management_group_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="SUBSCRIPTION_ID", - ) - - response = client.management_group_network_manager_connections.list( - management_group_id="managementGroupA", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8f0b9539490f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_management_group_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="SUBSCRIPTION_ID", - ) - - response = client.management_group_network_manager_connections.create_or_update( - management_group_id="managementGroupA", - network_manager_connection_name="TestNMConnection", - parameters={ - "properties": { - "networkManagerId": "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager" - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a4f0c80f1ded..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_subscription_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.subscription_network_manager_connections.delete( - network_manager_connection_name="TestNMConnection", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 414b77ae6af2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_subscription_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.subscription_network_manager_connections.get( - network_manager_connection_name="TestNMConnection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 19e227e68904..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_subscription_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.subscription_network_manager_connections.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 58968c11fd99..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connection_subscription_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.subscription_network_manager_connections.create_or_update( - network_manager_connection_name="TestNMConnection", - parameters={ - "properties": { - "networkManagerId": "/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager" - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4b045cd259fc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connectivity_configuration_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.connectivity_configurations.begin_delete( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - configuration_name="myTestConnectivityConfig", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9116a06bfbec..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connectivity_configuration_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.connectivity_configurations.get( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - configuration_name="myTestConnectivityConfig", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 558f327748df..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connectivity_configuration_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.connectivity_configurations.list( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a42f325717fd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_connectivity_configuration_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.connectivity_configurations.create_or_update( - resource_group_name="myResourceGroup", - network_manager_name="testNetworkManager", - configuration_name="myTestConnectivityConfig", - connectivity_configuration={ - "properties": { - "appliesToGroups": [ - { - "groupConnectivity": "None", - "isGlobal": "False", - "networkGroupId": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1", - "useHubGateway": "True", - } - ], - "connectivityTopology": "HubAndSpoke", - "deleteExistingPeering": "True", - "description": "Sample Configuration", - "hubs": [ - { - "resourceId": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig", - "resourceType": "Microsoft.Network/virtualNetworks", - } - ], - "isGlobal": "True", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 984b247de3b0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_default_admin_rule_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.admin_rules.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleDefaultAdminRule", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkManagerDefaultAdminRuleGet.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/network_manager_default_admin_rule_put.py deleted file mode 100644 index 4564941b6efa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_put.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_default_admin_rule_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.admin_rules.create_or_update( - 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"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkManagerDefaultAdminRulePut.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 deleted file mode 100644 index d69a04436f9e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_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.network_managers.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a9f1edde23d7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_deployment_status_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.network_manager_deployment_status.list( - resource_group_name="resoureGroupSample", - network_manager_name="testNetworkManager", - parameters={ - "deploymentTypes": ["Connectivity", "AdminPolicy"], - "regions": ["eastus", "westus"], - "skipToken": "FakeSkipTokenCode", - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2d59c02b9cfb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_effective_connectivity_configurations_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.list_network_manager_effective_connectivity_configurations( - resource_group_name="myResourceGroup", - virtual_network_name="testVirtualNetwork", - parameters={"skipToken": "FakeSkipTokenCode"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 039589e44925..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_effective_security_admin_rules_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.list_network_manager_effective_security_admin_rules( - resource_group_name="myResourceGroup", - virtual_network_name="testVirtualNetwork", - parameters={"skipToken": "FakeSkipTokenCode"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f2e0d2db4535..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_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.network_managers.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8a9510af58a9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_group_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.network_groups.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cd498dc16ebe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_group_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.network_groups.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f902d8c584f6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_group_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.network_groups.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/2023-02-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 deleted file mode 100644 index 6907258f5ef5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_group_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.network_groups.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - parameters={"properties": {"description": "A sample group"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c9c5da167699..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_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.network_managers.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dd1e50ca84e2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_list_all.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.network_managers.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 123a61028caa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_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.network_managers.patch( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5694885cf51f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_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.network_managers.create_or_update( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - parameters={ - "properties": { - "description": "My Test Network Manager", - "networkManagerScopeAccesses": ["Connectivity"], - "networkManagerScopes": { - "managementGroups": ["/Microsoft.Management/testmg"], - "subscriptions": ["/subscriptions/00000000-0000-0000-0000-000000000000"], - }, - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkManagerPut.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 deleted file mode 100644 index d5df0e75213d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_scope_connection_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.scope_connections.delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - scope_connection_name="TestScopeConnection", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8f6ba0844bc6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_scope_connection_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.scope_connections.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - scope_connection_name="TestScopeConnection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f285f734b0aa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_scope_connection_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.scope_connections.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/2023-02-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 deleted file mode 100644 index 6750d03baf76..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_scope_connection_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.scope_connections.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - scope_connection_name="TestScopeConnection", - parameters={ - "properties": { - "description": "This is a scope connection to a cross tenant subscription.", - "resourceId": "subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b", - "tenantId": "6babcaad-604b-40ac-a9d7-9fd97c0b779f", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fa2ec4ba5019..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.security_admin_configurations.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b5e4ea4fdcf2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.security_admin_configurations.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 01aabe54147d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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.security_admin_configurations.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/2023-02-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 deleted file mode 100644 index 6a6ecd96b657..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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.security_admin_configurations.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - security_admin_configuration={ - "properties": {"applyOnNetworkIntentPolicyBasedServices": ["None"], "description": "A sample policy"} - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkManagerSecurityAdminConfigurationPut.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 deleted file mode 100644 index 60c06a3ecf40..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_static_member_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.static_members.delete( - resource_group_name="SampleRG", - network_manager_name="TestNM", - network_group_name="testNetworkGroup", - static_member_name="testStaticMember", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f0bca2a8a380..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_static_member_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.static_members.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - static_member_name="testStaticMember", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1348e72a460b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_static_member_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.static_members.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3f13b8eaa20f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_manager_static_member_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.static_members.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - network_group_name="testNetworkGroup", - static_member_name="testStaticMember", - parameters={ - "properties": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1" - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d1bc2257a5d7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_create_config_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.network_profiles.create_or_update( - resource_group_name="rg1", - network_profile_name="networkProfile1", - parameters={ - "location": "westus", - "properties": { - "containerNetworkInterfaceConfigurations": [ - { - "name": "eth1", - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1" - } - }, - } - ] - }, - } - ] - }, - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1943177a4eb1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_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="subid", - ) - - client.network_profiles.begin_delete( - resource_group_name="rg1", - network_profile_name="networkProfile1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ec2489e3a313..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_get_config_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.network_profiles.get( - resource_group_name="rg1", - network_profile_name="networkProfile1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 65df1c6fac1b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_get_with_container_nic.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.network_profiles.get( - resource_group_name="rg1", - network_profile_name="networkProfile1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b2272dce71e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_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="subid", - ) - - response = client.network_profiles.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 752129a8d697..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_list_all.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.network_profiles.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 16c94999e5c2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_profile_update_tags.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.network_profiles.update_tags( - resource_group_name="rg1", - network_profile_name="test-np", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d1f0d727c444..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_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="subid", - ) - - response = client.network_security_groups.begin_create_or_update( - resource_group_name="rg1", - network_security_group_name="testnsg", - parameters={"location": "eastus"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b293c3701ecf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_create_with_rule.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.network_security_groups.begin_create_or_update( - resource_group_name="rg1", - network_security_group_name="testnsg", - parameters={ - "location": "eastus", - "properties": { - "securityRules": [ - { - "name": "rule1", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "80", - "direction": "Inbound", - "priority": 130, - "protocol": "*", - "sourceAddressPrefix": "*", - "sourcePortRange": "*", - }, - } - ] - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ed657ca8e040..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_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="subid", - ) - - client.network_security_groups.begin_delete( - resource_group_name="rg1", - network_security_group_name="testnsg", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 767a06e44414..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_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="subid", - ) - - response = client.network_security_groups.get( - resource_group_name="rg1", - network_security_group_name="testnsg", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 83ceb97b2bb6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_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="subid", - ) - - response = client.network_security_groups.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9a17d6a511cb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_list_all.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.network_security_groups.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 168405186a43..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_rule_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="subid", - ) - - response = client.security_rules.begin_create_or_update( - resource_group_name="rg1", - network_security_group_name="testnsg", - security_rule_name="rule1", - security_rule_parameters={ - "properties": { - "access": "Deny", - "destinationAddressPrefix": "11.0.0.0/8", - "destinationPortRange": "8080", - "direction": "Outbound", - "priority": 100, - "protocol": "*", - "sourceAddressPrefix": "10.0.0.0/8", - "sourcePortRange": "*", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fe37499af7e1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_rule_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="subid", - ) - - client.security_rules.begin_delete( - resource_group_name="rg1", - network_security_group_name="testnsg", - security_rule_name="rule1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8bf84da26831..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_rule_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="subid", - ) - - response = client.security_rules.get( - resource_group_name="rg1", - network_security_group_name="testnsg", - security_rule_name="rule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fe546974ade7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_rule_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="subid", - ) - - response = client.security_rules.list( - resource_group_name="rg1", - network_security_group_name="testnsg", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6cac47555d1b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_security_group_update_tags.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.network_security_groups.update_tags( - resource_group_name="rg1", - network_security_group_name="testnsg", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f3ac82eeba30..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_connection_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="subid", - ) - - client.network_virtual_appliance_connections.begin_delete( - resource_group_name="rg1", - network_virtual_appliance_name="nva1", - connection_name="connection1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 801d65e0ef23..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_connection_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="subid", - ) - - response = client.network_virtual_appliance_connections.get( - resource_group_name="rg1", - network_virtual_appliance_name="nva1", - connection_name="connection1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c980c2048532..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_connection_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="subid", - ) - - response = client.network_virtual_appliance_connections.list( - resource_group_name="rg1", - network_virtual_appliance_name="nva1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkVirtualApplianceConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_put.py deleted file mode 100644 index 055c780652bf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_put.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_connection_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="subid", - ) - - response = client.network_virtual_appliance_connections.begin_create_or_update( - resource_group_name="rg1", - network_virtual_appliance_name="nva1", - connection_name="connection1", - network_virtual_appliance_connection_parameters={ - "properties": { - "asn": 64512, - "bgpPeerAddress": ["169.254.16.13", "169.254.16.14"], - "enableInternetSecurity": False, - "name": "connection1", - "routingConfiguration": { - "associatedRouteTable": { - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - }, - "inboundRouteMap": { - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1" - }, - "outboundRouteMap": { - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2" - }, - "propagatedRouteTables": { - "ids": [ - { - "resourceUri": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - } - ], - "labels": ["label1"], - }, - }, - "tunnelIdentifier": 0, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkVirtualApplianceConnectionPut.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 deleted file mode 100644 index 83f282d43abc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_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="subid", - ) - - client.network_virtual_appliances.begin_delete( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkVirtualApplianceDelete.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 deleted file mode 100644 index 07419ba68dd1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_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="subid", - ) - - response = client.network_virtual_appliances.get( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index eda34a74f711..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_list_by_resource_group.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.network_virtual_appliances.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dbef5afd45d2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_list_by_subscription.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.network_virtual_appliances.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8329a78c0697..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_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="subid", - ) - - response = client.network_virtual_appliances.begin_create_or_update( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "West US", - "properties": { - "additionalNics": [{"hasPublicIp": True, "name": "exrsdwan"}], - "bootStrapConfigurationBlobs": [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" - ], - "cloudInitConfigurationBlobs": [ - "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" - ], - "nvaSku": {"bundledScaleUnit": "1", "marketPlaceVersion": "12.1", "vendor": "Cisco SDWAN"}, - "virtualApplianceAsn": 10000, - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 09d7b93745d3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_saa_sput.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.network_virtual_appliances.begin_create_or_update( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - parameters={ - "location": "West US", - "properties": { - "delegation": {"serviceName": "PaloAltoNetworks.Cloudngfw/firewalls"}, - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ef05fa568388..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_site_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="subid", - ) - - client.virtual_appliance_sites.begin_delete( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - site_name="site1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1dd792a7e8c5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_site_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="subid", - ) - - response = client.virtual_appliance_sites.get( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - site_name="site1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 012d0d3f62aa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_site_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="subid", - ) - - response = client.virtual_appliance_sites.list( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6afad4327207..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_site_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="subid", - ) - - response = client.virtual_appliance_sites.begin_create_or_update( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - site_name="site1", - parameters={ - "properties": { - "addressPrefix": "192.168.1.0/24", - "o365Policy": {"breakOutCategories": {"allow": True, "default": True, "optimize": True}}, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ab2b427dc6f7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_sku_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="subid", - ) - - response = client.virtual_appliance_skus.get( - sku_name="ciscoSdwan", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a1b24f2a8301..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_sku_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="subid", - ) - - response = client.virtual_appliance_skus.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkVirtualApplianceSkuList.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 deleted file mode 100644 index f538899f947c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_virtual_appliance_update_tags.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.network_virtual_appliances.update_tags( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 269b72901f58..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_available_providers_list_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="subid", - ) - - response = client.network_watchers.begin_list_available_providers( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "azureLocations": ["West US"], - "city": "seattle", - "country": "United States", - "state": "washington", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0204f2bdcca0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_azure_reachability_report_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="subid", - ) - - response = client.network_watchers.begin_get_azure_reachability_report( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "azureLocations": ["West US"], - "endTime": "2017-09-10T00:00:00Z", - "providerLocation": {"country": "United States", "state": "washington"}, - "providers": ["Frontier Communications of America, Inc. - ASN 5650"], - "startTime": "2017-09-07T00:00:00Z", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ab6630de50e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_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="subid", - ) - - response = client.connection_monitors.begin_create_or_update( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - parameters={ - "location": "eastus", - "properties": { - "endpoints": [ - { - "name": "source", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1", - }, - {"address": "bing.com", "name": "destination"}, - ], - "testConfigurations": [ - {"name": "tcp", "protocol": "Tcp", "tcpConfiguration": {"port": 80}, "testFrequencySec": 60} - ], - "testGroups": [ - { - "destinations": ["destination"], - "name": "tg", - "sources": ["source"], - "testConfigurations": ["tcp"], - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/NetworkWatcherConnectionMonitorCreate.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 deleted file mode 100644 index a4230785978e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_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="subid", - ) - - client.connection_monitors.begin_delete( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8343a117241e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_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="subid", - ) - - response = client.connection_monitors.get( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cffc57db000c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_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="subid", - ) - - response = client.connection_monitors.list( - resource_group_name="rg1", - network_watcher_name="nw1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 060626cdf171..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_query.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.connection_monitors.begin_query( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fdcde4c2f18c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_start.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", - ) - - client.connection_monitors.begin_start( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c4d22b9b81e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_stop.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", - ) - - client.connection_monitors.begin_stop( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 85271b9e33f8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_update_tags.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.connection_monitors.update_tags( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 81bf5670b539..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connection_monitor_v2_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="subid", - ) - - response = client.connection_monitors.begin_create_or_update( - resource_group_name="rg1", - network_watcher_name="nw1", - connection_monitor_name="cm1", - parameters={ - "properties": { - "endpoints": [ - { - "name": "vm1", - "resourceId": "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1", - }, - { - "filter": {"items": [{"address": "npmuser", "type": "AgentAddress"}], "type": "Include"}, - "name": "CanaryWorkspaceVamshi", - "resourceId": "/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace", - }, - {"address": "bing.com", "name": "bing"}, - {"address": "google.com", "name": "google"}, - ], - "outputs": [], - "testConfigurations": [ - { - "name": "testConfig1", - "protocol": "Tcp", - "tcpConfiguration": {"disableTraceRoute": False, "port": 80}, - "testFrequencySec": 60, - } - ], - "testGroups": [ - { - "destinations": ["bing", "google"], - "disable": False, - "name": "test1", - "sources": ["vm1", "CanaryWorkspaceVamshi"], - "testConfigurations": ["testConfig1"], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index de85a590d6aa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_connectivity_check.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.network_watchers.begin_check_connectivity( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "destination": {"address": "192.168.100.4", "port": 3389}, - "preferredIPVersion": "IPv4", - "source": { - "resourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1" - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 02717eb0e47d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_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="subid", - ) - - response = client.network_watchers.create_or_update( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={"location": "eastus", "properties": {}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 188cd109bee4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_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="subid", - ) - - client.network_watchers.begin_delete( - resource_group_name="rg1", - network_watcher_name="nw1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c6863ac1855b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_configure.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.network_watchers.begin_set_flow_log_configuration( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "properties": { - "enabled": True, - "storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - }, - "targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f214afbb6aa8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_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="subid", - ) - - response = client.flow_logs.begin_create_or_update( - resource_group_name="rg1", - network_watcher_name="nw1", - flow_log_name="fl", - parameters={ - "location": "centraluseuap", - "properties": { - "enabled": True, - "format": {"type": "JSON", "version": 1}, - "storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe", - "targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9b356de4eaee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_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="subid", - ) - - client.flow_logs.begin_delete( - resource_group_name="rg1", - network_watcher_name="nw1", - flow_log_name="fl", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f09e2b68f6f1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_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="subid", - ) - - response = client.flow_logs.get( - resource_group_name="rg1", - network_watcher_name="nw1", - flow_log_name="flowLog1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0f02925b1efb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_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="subid", - ) - - response = client.flow_logs.list( - resource_group_name="rg1", - network_watcher_name="nw1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cafd5806b810..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_status_query.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.network_watchers.begin_get_flow_log_status( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1" - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2a15e21abd8a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_flow_log_update_tags.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.flow_logs.update_tags( - resource_group_name="rg1", - network_watcher_name="nw", - flow_log_name="fl", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c3ed8617f948..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_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="subid", - ) - - response = client.network_watchers.get( - resource_group_name="rg1", - network_watcher_name="nw1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e63b4aff4cd7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_ip_flow_verify.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.network_watchers.begin_verify_ip_flow( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "direction": "Outbound", - "localIPAddress": "10.2.0.4", - "localPort": "80", - "protocol": "TCP", - "remoteIPAddress": "121.10.1.1", - "remotePort": "80", - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 862f5edd6cd7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_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="subid", - ) - - response = client.network_watchers.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3b7a1d03355a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_list_all.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.network_watchers.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cbcf5b5fb594..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_network_configuration_diagnostic.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.network_watchers.begin_get_network_configuration_diagnostic( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "profiles": [ - { - "destination": "12.11.12.14", - "destinationPort": "12100", - "direction": "Inbound", - "protocol": "TCP", - "source": "10.1.0.4", - } - ], - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dd91c3aeb06b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_next_hop_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="subid", - ) - - response = client.network_watchers.begin_get_next_hop( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "destinationIPAddress": "10.0.0.10", - "sourceIPAddress": "10.0.0.5", - "targetNicResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1", - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 79e3babb2b39..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_capture_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="subid", - ) - - response = client.packet_captures.begin_create( - resource_group_name="rg1", - network_watcher_name="nw1", - packet_capture_name="pc1", - parameters={ - "properties": { - "bytesToCapturePerPacket": 10000, - "filters": [{"localIPAddress": "10.0.0.4", "localPort": "80", "protocol": "TCP"}], - "storageLocation": { - "filePath": "D:\\capture\\pc1.cap", - "storageId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore", - "storagePath": "https://mytestaccountname.blob.core.windows.net/capture/pc1.cap", - }, - "target": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - "timeLimitInSeconds": 100, - "totalBytesPerSession": 100000, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1f891abaabb5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_capture_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="subid", - ) - - client.packet_captures.begin_delete( - resource_group_name="rg1", - network_watcher_name="nw1", - packet_capture_name="pc1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1f67885f34b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_capture_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="subid", - ) - - response = client.packet_captures.get( - resource_group_name="rg1", - network_watcher_name="nw1", - packet_capture_name="pc1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e9ba326bfc60..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_capture_query_status.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.packet_captures.begin_get_status( - resource_group_name="rg1", - network_watcher_name="nw1", - packet_capture_name="pc1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8d54e290b56d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_capture_stop.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", - ) - - client.packet_captures.begin_stop( - resource_group_name="rg1", - network_watcher_name="nw1", - packet_capture_name="pc1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b3484e7cb988..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_packet_captures_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="subid", - ) - - response = client.packet_captures.list( - resource_group_name="rg1", - network_watcher_name="nw1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 70babc677a49..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_security_group_view_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="subid", - ) - - response = client.network_watchers.begin_get_vm_security_rules( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1" - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e9dc0e0fc5e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_topology_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="subid", - ) - - response = client.network_watchers.get_topology( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={"targetResourceGroupName": "rg2"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f58fb3f495bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_troubleshoot_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="subid", - ) - - response = client.network_watchers.begin_get_troubleshooting( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "properties": { - "storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1", - "storagePath": "https://st1.blob.core.windows.net/cn1", - }, - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c85ef33a488d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_troubleshoot_result_query.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.network_watchers.begin_get_troubleshooting_result( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={ - "targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1" - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4335728c699e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python network_watcher_update_tags.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.network_watchers.update_tags( - resource_group_name="rg1", - network_watcher_name="nw1", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 62b63e6a0ca9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/operation_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python operation_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="subid", - ) - - response = client.operations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a38e1d7db8bd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_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="subid", - ) - - client.p2_svpn_gateways.begin_delete( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 552f3d0b343c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_generate_vpn_profile.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.p2_svpn_gateways.begin_generate_vpn_profile( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - parameters={"authenticationMethod": "EAPTLS"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fe13a0d8ec2b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_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="subid", - ) - - response = client.p2_svpn_gateways.get( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 94836514ba53..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_get_connection_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.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c9690c523cd9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_get_connection_health_detailed.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.p2_svpn_gateways.begin_get_p2_s_vpn_connection_health_detailed( - resource_group_name="p2s-vpn-gateway-test", - gateway_name="p2svpngateway", - request={ - "outputBlobSasUrl": "https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - "vpnUserNamesFilter": ["vpnUser1", "vpnUser2"], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8add9294060c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_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="subid", - ) - - response = client.p2_svpn_gateways.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4891243e0357..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_list_by_resource_group.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.p2_svpn_gateways.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/P2SVpnGatewayListByResourceGroup.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 deleted file mode 100644 index 7ec424f06088..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python p2_svpn_gateway_reset.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.p2_svpn_gateways.begin_reset( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/P2SVpnGatewayReset.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 deleted file mode 100644 index d72a2d7f15ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python peer_express_route_circuit_connection_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="subid1", - ) - - response = client.peer_express_route_circuit_connections.get( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - connection_name="60aee347-e889-4a42-8c1b-0aae8b1e4013", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 67974f02a5f2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python peer_express_route_circuit_connection_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="subid1", - ) - - response = client.peer_express_route_circuit_connections.list( - resource_group_name="rg1", - circuit_name="ExpressRouteARMCircuitA", - peering_name="AzurePrivatePeering", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 69f56a996d85..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_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="subId", - ) - - response = client.private_endpoints.begin_create_or_update( - resource_group_name="rg1", - private_endpoint_name="testPe", - parameters={ - "location": "eastus2euap", - "properties": { - "customNetworkInterfaceName": "testPeNic", - "ipConfigurations": [ - { - "name": "pestaticconfig", - "properties": {"groupId": "file", "memberName": "file", "privateIPAddress": "192.168.0.6"}, - } - ], - "privateLinkServiceConnections": [ - { - "properties": { - "groupIds": ["groupIdFromResource"], - "privateLinkServiceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - "requestMessage": "Please approve my connection.", - } - } - ], - "subnet": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet" - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 137f600a157e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_create_for_manual_approval.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.private_endpoints.begin_create_or_update( - resource_group_name="rg1", - private_endpoint_name="testPe", - parameters={ - "location": "eastus", - "properties": { - "customNetworkInterfaceName": "testPeNic", - "ipConfigurations": [ - { - "name": "pestaticconfig", - "properties": {"groupId": "file", "memberName": "file", "privateIPAddress": "192.168.0.5"}, - } - ], - "manualPrivateLinkServiceConnections": [ - { - "properties": { - "groupIds": ["groupIdFromResource"], - "privateLinkServiceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - "requestMessage": "Please manually approve my connection.", - } - } - ], - "subnet": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet" - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6279bd7538cf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_create_with_asg.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.private_endpoints.begin_create_or_update( - resource_group_name="rg1", - private_endpoint_name="testPe", - parameters={ - "location": "eastus2euap", - "properties": { - "applicationSecurityGroups": [ - { - "id": "/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1" - } - ], - "privateLinkServiceConnections": [ - { - "properties": { - "groupIds": ["groupIdFromResource"], - "privateLinkServiceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls", - "requestMessage": "Please approve my connection.", - } - } - ], - "subnet": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet" - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fb96dcca087e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_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="subId", - ) - - client.private_endpoints.begin_delete( - resource_group_name="rg1", - private_endpoint_name="testPe", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e2ce55287edf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_dns_zone_group_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="subId", - ) - - response = client.private_dns_zone_groups.begin_create_or_update( - resource_group_name="rg1", - private_endpoint_name="testPe", - private_dns_zone_group_name="testPdnsgroup", - parameters={ - "properties": { - "privateDnsZoneConfigs": [ - { - "properties": { - "privateDnsZoneId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com" - } - } - ] - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 80479049c195..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_dns_zone_group_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="subId", - ) - - client.private_dns_zone_groups.begin_delete( - resource_group_name="rg1", - private_endpoint_name="testPe", - private_dns_zone_group_name="testPdnsgroup", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a26871b1acee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_dns_zone_group_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="subId", - ) - - response = client.private_dns_zone_groups.get( - resource_group_name="rg1", - private_endpoint_name="testPe", - private_dns_zone_group_name="testPdnsgroup", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 765fd54c60c8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_dns_zone_group_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="subId", - ) - - response = client.private_dns_zone_groups.list( - private_endpoint_name="testPe", - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3eb043f0c912..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_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="subId", - ) - - response = client.private_endpoints.get( - resource_group_name="rg1", - private_endpoint_name="testPe", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ad6f8a0b9268..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_get_for_manual_approval.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.private_endpoints.get( - resource_group_name="rg1", - private_endpoint_name="testPe", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c79b31284c6e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_get_with_asg.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.private_endpoints.get( - resource_group_name="rg1", - private_endpoint_name="testPe", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d333aa1ecb22..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_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="subId", - ) - - response = client.private_endpoints.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 07fa2999aef1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_endpoint_list_all.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.private_endpoints.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 707816f34e3f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_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="subId", - ) - - response = client.private_link_services.begin_create_or_update( - resource_group_name="rg1", - service_name="testPls", - parameters={ - "location": "eastus", - "properties": { - "autoApproval": {"subscriptions": ["subscription1", "subscription2"]}, - "fqdns": ["fqdn1", "fqdn2", "fqdn3"], - "ipConfigurations": [ - { - "name": "fe-lb", - "properties": { - "privateIPAddress": "10.0.1.4", - "privateIPAddressVersion": "IPv4", - "privateIPAllocationMethod": "Static", - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb" - }, - }, - } - ], - "loadBalancerFrontendIpConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb" - } - ], - "visibility": {"subscriptions": ["subscription1", "subscription2", "subscription3"]}, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b41078068085..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_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="subId", - ) - - client.private_link_services.begin_delete( - resource_group_name="rg1", - service_name="testPls", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index aaf34b75a5f3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_delete_private_endpoint_connection.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", - ) - - client.private_link_services.begin_delete_private_endpoint_connection( - resource_group_name="rg1", - service_name="testPls", - pe_connection_name="testPlePeConnection", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4660c9d670da..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_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="subId", - ) - - response = client.private_link_services.get( - resource_group_name="rg1", - service_name="testPls", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7bf6bf8006c5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_get_private_endpoint_connection.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.private_link_services.get_private_endpoint_connection( - resource_group_name="rg1", - service_name="testPls", - pe_connection_name="testPlePeConnection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b95613b9da33..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_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="subId", - ) - - response = client.private_link_services.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dfb70db23cca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_list_all.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.private_link_services.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 27a52edfc702..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_list_private_endpoint_connection.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.private_link_services.list_private_endpoint_connections( - resource_group_name="rg1", - service_name="testPls", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 56b5731a08e9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python private_link_service_update_private_endpoint_connection.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.private_link_services.update_private_endpoint_connection( - resource_group_name="rg1", - service_name="testPls", - pe_connection_name="testPlePeConnection", - parameters={ - "name": "testPlePeConnection", - "properties": { - "privateEndpoint": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe" - }, - "privateLinkServiceConnectionState": { - "description": "approved it for some reason.", - "status": "Approved", - }, - }, - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 146a8d70532d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_create_customized_values.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.public_ip_addresses.begin_create_or_update( - resource_group_name="rg1", - public_ip_address_name="test-ip", - parameters={ - "location": "eastus", - "properties": { - "idleTimeoutInMinutes": 10, - "publicIPAddressVersion": "IPv4", - "publicIPAllocationMethod": "Static", - }, - "sku": {"name": "Standard", "tier": "Global"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 99fa7aa4d02d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_create_defaults.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.public_ip_addresses.begin_create_or_update( - resource_group_name="rg1", - public_ip_address_name="test-ip", - parameters={"location": "eastus"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1ff02148c4bf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_create_dns.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.public_ip_addresses.begin_create_or_update( - resource_group_name="rg1", - public_ip_address_name="test-ip", - parameters={"location": "eastus", "properties": {"dnsSettings": {"domainNameLabel": "dnslbl"}}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1395d36d3553..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_create_dns_with_domain_name_label_scope.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.public_ip_addresses.begin_create_or_update( - resource_group_name="rg1", - public_ip_address_name="test-ip", - parameters={ - "location": "eastus", - "properties": {"dnsSettings": {"domainNameLabel": "dnslbl", "domainNameLabelScope": "TenantReuse"}}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0ef3f675cde3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_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="subid", - ) - - client.public_ip_addresses.begin_delete( - resource_group_name="rg1", - public_ip_address_name="test-ip", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cc0670aeec68..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_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="subid", - ) - - response = client.public_ip_addresses.get( - resource_group_name="rg1", - public_ip_address_name="testDNS-ip", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 92232fb0991f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_get_ddos_protection_status.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.public_ip_addresses.begin_ddos_protection_status( - resource_group_name="rg1", - public_ip_address_name="test-pip", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7e6b49a1b844..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_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="subid", - ) - - response = client.public_ip_addresses.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3f0ad7f83caa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_list_all.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.public_ip_addresses.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 74cc9fd04b75..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_address_update_tags.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.public_ip_addresses.update_tags( - resource_group_name="rg1", - public_ip_address_name="test-ip", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 48e8a548d629..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_create_customized_values.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.public_ip_prefixes.begin_create_or_update( - resource_group_name="rg1", - public_ip_prefix_name="test-ipprefix", - parameters={ - "location": "westus", - "properties": {"prefixLength": 30, "publicIPAddressVersion": "IPv4"}, - "sku": {"name": "Standard", "tier": "Regional"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 18a660a46ab4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_create_defaults.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.public_ip_prefixes.begin_create_or_update( - resource_group_name="rg1", - public_ip_prefix_name="test-ipprefix", - parameters={"location": "westus", "properties": {"prefixLength": 30}, "sku": {"name": "Standard"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3db29b4f2d99..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_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="subid", - ) - - client.public_ip_prefixes.begin_delete( - resource_group_name="rg1", - public_ip_prefix_name="test-ipprefix", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4efddb176d4d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_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="subid", - ) - - response = client.public_ip_prefixes.get( - resource_group_name="rg1", - public_ip_prefix_name="test-ipprefix", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 57fa21130f36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_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="subid", - ) - - response = client.public_ip_prefixes.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e339ee4f3aee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_list_all.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.public_ip_prefixes.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 00940299c85b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python public_ip_prefix_update_tags.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.public_ip_prefixes.update_tags( - resource_group_name="rg1", - public_ip_prefix_name="test-ipprefix", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0516ba2a022d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python query_inbound_nat_rule_port_mapping.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_balancers.begin_list_inbound_nat_rule_port_mappings( - group_name="rg1", - load_balancer_name="lb1", - backend_pool_name="bp1", - parameters={"ipAddress": "10.0.0.4"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/QueryInboundNatRulePortMapping.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 deleted file mode 100644 index ee2f1a0aac32..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_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="subid", - ) - - response = client.route_filters.begin_create_or_update( - resource_group_name="rg1", - route_filter_name="filterName", - route_filter_parameters={ - "location": "West US", - "properties": { - "rules": [ - { - "name": "ruleName", - "properties": { - "access": "Allow", - "communities": ["12076:5030", "12076:5040"], - "routeFilterRuleType": "Community", - }, - } - ] - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9f63605b0eef..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_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="subid", - ) - - client.route_filters.begin_delete( - resource_group_name="rg1", - route_filter_name="filterName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 74ec328d5c3f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_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="subid", - ) - - response = client.route_filters.get( - resource_group_name="rg1", - route_filter_name="filterName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d6b601614331..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_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="subid", - ) - - response = client.route_filters.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 87ca061cf8dc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_list_by_resource_group.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.route_filters.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9a31ad1cb723..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_rule_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="subid", - ) - - response = client.route_filter_rules.begin_create_or_update( - resource_group_name="rg1", - route_filter_name="filterName", - rule_name="ruleName", - route_filter_rule_parameters={ - "properties": { - "access": "Allow", - "communities": ["12076:5030", "12076:5040"], - "routeFilterRuleType": "Community", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6002f47a00ea..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_rule_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="subid", - ) - - client.route_filter_rules.begin_delete( - resource_group_name="rg1", - route_filter_name="filterName", - rule_name="ruleName", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 414aad4abaf5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_rule_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="subid", - ) - - response = client.route_filter_rules.get( - resource_group_name="rg1", - route_filter_name="filterName", - rule_name="filterName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index eb1d20b14f53..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_rule_list_by_route_filter.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.route_filter_rules.list_by_route_filter( - resource_group_name="rg1", - route_filter_name="filterName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ab1258c82952..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_filter_update_tags.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.route_filters.update_tags( - resource_group_name="rg1", - route_filter_name="filterName", - parameters={"tags": {"key1": "value1"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b464a72ac8f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_map_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="subid", - ) - - client.route_maps.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_map_name="routeMap1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b544f3ced857..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_map_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="subid", - ) - - response = client.route_maps.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_map_name="routeMap1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 36f3513820be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_map_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="subid", - ) - - response = client.route_maps.list( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 23223b159f43..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_map_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="subid", - ) - - response = client.route_maps.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_map_name="routeMap1", - route_map_parameters={ - "properties": { - "associatedInboundConnections": [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1" - ], - "associatedOutboundConnections": [], - "rules": [ - { - "actions": [ - {"parameters": [{"asPath": ["22334"], "community": [], "routePrefix": []}], "type": "Add"} - ], - "matchCriteria": [ - {"asPath": [], "community": [], "matchCondition": "Contains", "routePrefix": ["10.0.0.0/8"]} - ], - "name": "rule1", - "nextStepIfMatched": "Continue", - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1cfb7b6e2fc9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_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="subid", - ) - - response = client.route_tables.begin_create_or_update( - resource_group_name="rg1", - route_table_name="testrt", - parameters={"location": "westus"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0a426cd52f1f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_create_with_route.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.route_tables.begin_create_or_update( - resource_group_name="rg1", - route_table_name="testrt", - parameters={ - "location": "westus", - "properties": { - "disableBgpRoutePropagation": True, - "routes": [ - { - "name": "route1", - "properties": {"addressPrefix": "10.0.3.0/24", "nextHopType": "VirtualNetworkGateway"}, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b51f5b6b0318..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_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="subid", - ) - - client.route_tables.begin_delete( - resource_group_name="rg1", - route_table_name="testrt", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 93f2a430a357..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_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="subid", - ) - - response = client.route_tables.get( - resource_group_name="rg1", - route_table_name="testrt", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c1479985398b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_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="subid", - ) - - response = client.route_tables.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0135497c5644..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_list_all.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.route_tables.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ff9dd795b535..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_route_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="subid", - ) - - response = client.routes.begin_create_or_update( - resource_group_name="rg1", - route_table_name="testrt", - route_name="route1", - route_parameters={"properties": {"addressPrefix": "10.0.3.0/24", "nextHopType": "VirtualNetworkGateway"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d321a9ca76ce..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_route_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="subid", - ) - - client.routes.begin_delete( - resource_group_name="rg1", - route_table_name="testrt", - route_name="route1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d21e448cafae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_route_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="subid", - ) - - response = client.routes.get( - resource_group_name="rg1", - route_table_name="testrt", - route_name="route1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6a9cb985b43f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_route_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="subid", - ) - - response = client.routes.list( - resource_group_name="rg1", - route_table_name="testrt", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f9f9e7f53969..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python route_table_update_tags.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.route_tables.update_tags( - resource_group_name="rg1", - route_table_name="testrt", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fb1a67989d03..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python routing_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="subid", - ) - - client.routing_intent.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - routing_intent_name="Intent1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2bb9603ddee4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python routing_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, - 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.routing_intent.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - routing_intent_name="Intent1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 47e3bdf5b0c3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python routing_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="subid", - ) - - response = client.routing_intent.list( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7c546d569316..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python routing_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="subid", - ) - - response = client.routing_intent.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - routing_intent_name="Intent1", - routing_intent_parameters={ - "properties": { - "routingPolicies": [ - { - "destinations": ["Internet"], - "name": "InternetTraffic", - "nextHop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - { - "destinations": ["PrivateTraffic"], - "name": "PrivateTrafficPolicy", - "nextHop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1", - }, - ] - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cba4e5ce5ed6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_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="subid", - ) - - client.security_partner_providers.begin_delete( - resource_group_name="rg1", - security_partner_provider_name="securityPartnerProvider", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c190792b96bb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_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="subid", - ) - - response = client.security_partner_providers.get( - resource_group_name="rg1", - security_partner_provider_name="securityPartnerProvider", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d97cb9d869b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_list_by_resource_group.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.security_partner_providers.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e6797d4c321c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_list_by_subscription.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.security_partner_providers.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 92a43d190d47..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_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="subid", - ) - - response = client.security_partner_providers.begin_create_or_update( - resource_group_name="rg1", - security_partner_provider_name="securityPartnerProvider", - parameters={ - "location": "West US", - "properties": { - "securityProviderName": "ZScaler", - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6d8d0abdaf1b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python security_partner_provider_update_tags.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.security_partner_providers.update_tags( - resource_group_name="rg1", - security_partner_provider_name="securityPartnerProvider", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4db72cf62e6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_community_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="subid", - ) - - response = client.bgp_service_communities.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a78ab69849e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_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="subid", - ) - - response = client.service_endpoint_policies.begin_create_or_update( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - parameters={"location": "westus"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d02a15184048..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_create_with_definition.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.service_endpoint_policies.begin_create_or_update( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - parameters={ - "location": "westus", - "properties": { - "serviceEndpointPolicyDefinitions": [ - { - "name": "StorageServiceEndpointPolicyDefinition", - "properties": { - "description": "Storage Service EndpointPolicy Definition", - "service": "Microsoft.Storage", - "serviceResources": [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - }, - } - ] - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/ServiceEndpointPolicyCreateWithDefinition.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_create.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_create.py deleted file mode 100644 index a73dcdf38871..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_create.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_definition_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="subid", - ) - - response = client.service_endpoint_policy_definitions.begin_create_or_update( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - service_endpoint_policy_definition_name="testDefinition", - service_endpoint_policy_definitions={ - "properties": { - "description": "Storage Service EndpointPolicy Definition", - "service": "Microsoft.Storage", - "serviceResources": [ - "/subscriptions/subid1", - "/subscriptions/subid1/resourceGroups/storageRg", - "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount", - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/ServiceEndpointPolicyDefinitionCreate.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 deleted file mode 100644 index 96b6cf19a054..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_definition_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="subid", - ) - - client.service_endpoint_policy_definitions.begin_delete( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - service_endpoint_policy_definition_name="testDefinition", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fa6d9094d3f5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_definition_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="subid", - ) - - response = client.service_endpoint_policy_definitions.get( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - service_endpoint_policy_definition_name="testDefinition", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0f49c0e9615d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_definition_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="subid", - ) - - response = client.service_endpoint_policy_definitions.list_by_resource_group( - resource_group_name="rg1", - service_endpoint_policy_name="testPolicy", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 490fb4b38da2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_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="subid", - ) - - client.service_endpoint_policies.begin_delete( - resource_group_name="rg1", - service_endpoint_policy_name="serviceEndpointPolicy1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d2e2ce82ad12..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_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="subid", - ) - - response = client.service_endpoint_policies.get( - resource_group_name="rg1", - service_endpoint_policy_name="testServiceEndpointPolicy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4b5c045a2cba..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_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="subid", - ) - - response = client.service_endpoint_policies.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f9c4fbe7b490..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_list_all.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.service_endpoint_policies.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 80e118cf7289..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_endpoint_policy_update_tags.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.service_endpoint_policies.update_tags( - resource_group_name="rg1", - service_endpoint_policy_name="testServiceEndpointPolicy", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d87ddb7132dc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_tag_information_list_result.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.service_tag_information.list( - location="westeurope", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index de3d1a1a7358..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_tag_information_list_result_with_no_address_prefixes.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.service_tag_information.list( - location="westeurope", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 052032f3c379..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_tag_information_list_result_with_tagname.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.service_tag_information.list( - location="westeurope", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bed244d7f01b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python service_tags_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="subId", - ) - - response = client.service_tags.list( - location="westcentralus", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/ServiceTagsList.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 deleted file mode 100644 index bf273d4acbab..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_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="subid", - ) - - response = client.subnets.begin_create_or_update( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - subnet_parameters={"properties": {"addressPrefix": "10.0.0.0/16"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 67ebbefa79a1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_create_service_endpoint.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.subnets.begin_create_or_update( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - subnet_parameters={ - "properties": {"addressPrefix": "10.0.0.0/16", "serviceEndpoints": [{"service": "Microsoft.Storage"}]} - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/SubnetCreateServiceEndpoint.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 deleted file mode 100644 index a3e0ebc989d2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_create_with_delegation.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.subnets.begin_create_or_update( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - subnet_parameters={"properties": {"addressPrefix": "10.0.0.0/16"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/SubnetCreateWithDelegation.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 deleted file mode 100644 index f9ab8e63610c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_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="subid", - ) - - client.subnets.begin_delete( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5f291e291b4e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_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="subid", - ) - - response = client.subnets.get( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0b5b0ee5becb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_get_with_delegation.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.subnets.get( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - subnet_name="subnet1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/SubnetGetWithDelegation.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 deleted file mode 100644 index 60eaea8dd0c9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_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="subid", - ) - - response = client.subnets.list( - resource_group_name="subnet-test", - virtual_network_name="vnetname", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5a5449bf12f0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_prepare_network_policies.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", - ) - - client.subnets.begin_prepare_network_policies( - resource_group_name="rg1", - virtual_network_name="test-vnet", - subnet_name="subnet1", - prepare_network_policies_request_parameters={"serviceName": "Microsoft.Sql/managedInstances"}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d57aa5bdcf60..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python subnet_unprepare_network_policies.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", - ) - - client.subnets.begin_unprepare_network_policies( - resource_group_name="rg1", - virtual_network_name="test-vnet", - subnet_name="subnet1", - unprepare_network_policies_request_parameters={"serviceName": "Microsoft.Sql/managedInstances"}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f5db47502264..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python usage_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="subid", - ) - - response = client.usages.list( - location="westus", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0f86da051914..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python usage_list_spaced_location.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.usages.list( - location="West US", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/UsageListSpacedLocation.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 deleted file mode 100644 index 5e724119eb3a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_bgp_connection_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="subid", - ) - - client.virtual_hub_bgp_connection.begin_delete( - resource_group_name="rg1", - virtual_hub_name="hub1", - connection_name="conn1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 610cc7935b52..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_bgp_connection_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="subid", - ) - - response = client.virtual_hub_bgp_connection.get( - resource_group_name="rg1", - virtual_hub_name="hub1", - connection_name="conn1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index acec59b283c9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_bgp_connection_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="subid", - ) - - response = client.virtual_hub_bgp_connections.list( - resource_group_name="rg1", - virtual_hub_name="hub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 473f8d3c4cbe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_bgp_connection_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="subid", - ) - - response = client.virtual_hub_bgp_connection.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="hub1", - connection_name="conn1", - parameters={ - "properties": { - "hubVirtualNetworkConnection": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1" - }, - "peerAsn": 20000, - "peerIp": "192.168.1.5", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fa35204fc9c6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_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="subid", - ) - - client.virtual_hubs.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 04e5a50532b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_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="subid", - ) - - response = client.virtual_hubs.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fad2604c7294..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_ip_configuration_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="subid", - ) - - client.virtual_hub_ip_configuration.begin_delete( - resource_group_name="rg1", - virtual_hub_name="hub1", - ip_config_name="ipconfig1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8073c126a064..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_ip_configuration_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="subid", - ) - - response = client.virtual_hub_ip_configuration.get( - resource_group_name="rg1", - virtual_hub_name="hub1", - ip_config_name="ipconfig1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a8c69e139791..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_ip_configuration_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="subid", - ) - - response = client.virtual_hub_ip_configuration.list( - resource_group_name="rg1", - virtual_hub_name="hub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1b477483c567..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_ip_configuration_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="subid", - ) - - response = client.virtual_hub_ip_configuration.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="hub1", - ip_config_name="ipconfig1", - parameters={ - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" - } - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e539964a7471..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_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="subid", - ) - - response = client.virtual_hubs.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 285326aacde9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_list_by_resource_group.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_hubs.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c9f66a62689c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_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="subid", - ) - - response = client.virtual_hubs.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub2", - virtual_hub_parameters={ - "location": "West US", - "properties": { - "addressPrefix": "10.168.0.0/24", - "sku": "Basic", - "virtualWan": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 520842151f69..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_route_table_v2_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="subid", - ) - - client.virtual_hub_route_table_v2_s.begin_delete( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="virtualHubRouteTable1a", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ef34ee2ff58c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_route_table_v2_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="subid", - ) - - response = client.virtual_hub_route_table_v2_s.get( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="virtualHubRouteTable1a", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6e0df767bd65..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_route_table_v2_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="subid", - ) - - response = client.virtual_hub_route_table_v2_s.list( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 65ce7239c947..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_route_table_v2_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="subid", - ) - - response = client.virtual_hub_route_table_v2_s.begin_create_or_update( - resource_group_name="rg1", - virtual_hub_name="virtualHub1", - route_table_name="virtualHubRouteTable1a", - virtual_hub_route_table_v2_parameters={ - "properties": { - "attachedConnections": ["All_Vnets"], - "routes": [ - { - "destinationType": "CIDR", - "destinations": ["20.10.0.0/16", "20.20.0.0/16"], - "nextHopType": "IPAddress", - "nextHops": ["10.0.0.68"], - }, - { - "destinationType": "CIDR", - "destinations": ["0.0.0.0/0"], - "nextHopType": "IPAddress", - "nextHops": ["10.0.0.68"], - }, - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c6eb3874ea83..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_hub_update_tags.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_hubs.update_tags( - resource_group_name="rg1", - virtual_hub_name="virtualHub2", - virtual_hub_parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cf2c70ea765c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_check_ip_address_availability.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.check_ip_address_availability( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e17805369998..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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": {"addressPrefixes": ["10.0.0.0/16"]}, "flowTimeoutInMinutes": 10}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5844ca46aa28..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_service_endpoint_policy.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="vnetTest", - virtual_network_name="vnet1", - parameters={ - "location": "eastus2euap", - "properties": { - "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [ - { - "name": "test-1", - "properties": { - "addressPrefix": "10.0.0.0/16", - "serviceEndpointPolicies": [ - { - "id": "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1" - } - ], - "serviceEndpoints": [{"service": "Microsoft.Storage"}], - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 632125e59137..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_service_endpoints.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="vnetTest", - virtual_network_name="vnet1", - parameters={ - "location": "eastus", - "properties": { - "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [ - { - "name": "test-1", - "properties": { - "addressPrefix": "10.0.0.0/16", - "serviceEndpoints": [{"service": "Microsoft.Storage"}], - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e8e0012cfd30..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_subnet.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": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [{"name": "test-1", "properties": {"addressPrefix": "10.0.0.0/24"}}], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f7f04ecc7a5b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_subnet_with_address_prefixes.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": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [{"name": "test-2", "properties": {"addressPrefixes": ["10.0.0.0/28", "10.0.1.0/28"]}}], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2c37ba1d4c76..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_subnet_with_delegation.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": "westcentralus", - "properties": { - "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [ - { - "name": "test-1", - "properties": { - "addressPrefix": "10.0.0.0/24", - "delegations": [ - { - "name": "myDelegation", - "properties": {"serviceName": "Microsoft.Sql/managedInstances"}, - } - ], - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f66c443b5e16..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_bgp_communities.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": {"addressPrefixes": ["10.0.0.0/16"]}, - "bgpCommunities": {"virtualNetworkCommunity": "12076:20000"}, - "subnets": [{"name": "test-1", "properties": {"addressPrefix": "10.0.0.0/24"}}], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c02d242263b2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_encryption.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": {"addressPrefixes": ["10.0.0.0/16"]}, - "encryption": {"enabled": True, "enforcement": "AllowUnencrypted"}, - "subnets": [{"name": "test-1", "properties": {"addressPrefix": "10.0.0.0/24"}}], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkCreateWithEncryption.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 deleted file mode 100644 index d30862f095ac..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_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="subid", - ) - - client.virtual_networks.begin_delete( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ecf0a250e0ae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_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="subid", - ) - - response = client.virtual_network_gateway_connections.begin_create_or_update( - resource_group_name="rg1", - virtual_network_gateway_connection_name="connS2S", - parameters={ - "location": "centralus", - "properties": { - "connectionMode": "Default", - "connectionProtocol": "IKEv2", - "connectionType": "IPsec", - "dpdTimeoutSeconds": 30, - "egressNatRules": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2" - } - ], - "enableBgp": False, - "gatewayCustomBgpIpAddresses": [ - { - "customBgpIpAddress": "169.254.21.1", - "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default", - }, - { - "customBgpIpAddress": "169.254.21.3", - "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive", - }, - ], - "ingressNatRules": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1" - } - ], - "ipsecPolicies": [], - "localNetworkGateway2": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", - "location": "centralus", - "properties": { - "gatewayIpAddress": "x.x.x.x", - "localNetworkAddressSpace": {"addressPrefixes": ["10.1.0.0/16"]}, - }, - "tags": {}, - }, - "routingWeight": 0, - "sharedKey": "Abc123", - "trafficSelectorPolicies": [], - "usePolicyBasedTrafficSelectors": False, - "virtualNetworkGateway1": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw", - "location": "centralus", - "properties": { - "activeActive": False, - "bgpSettings": {"asn": 65514, "bgpPeeringAddress": "10.0.1.30", "peerWeight": 0}, - "enableBgp": False, - "gatewayType": "Vpn", - "ipConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1", - "name": "gwipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet" - }, - }, - } - ], - "sku": {"name": "VpnGw1", "tier": "VpnGw1"}, - "vpnType": "RouteBased", - }, - "tags": {}, - }, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e5396173d181..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_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="subid", - ) - - client.virtual_network_gateway_connections.begin_delete( - resource_group_name="rg1", - virtual_network_gateway_connection_name="conn1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0fb0e90180dc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_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="subid", - ) - - response = client.virtual_network_gateway_connections.get( - resource_group_name="rg1", - virtual_network_gateway_connection_name="connS2S", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4bc312f97d9c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_get_ike_sas.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_gateway_connections.begin_get_ike_sas( - resource_group_name="rg1", - virtual_network_gateway_connection_name="vpngwcn1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 57b6d2123cb9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_get_shared_key.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_gateway_connections.get_shared_key( - resource_group_name="rg1", - virtual_network_gateway_connection_name="connS2S", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a604723134b4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_reset.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", - ) - - client.virtual_network_gateway_connections.begin_reset_connection( - resource_group_name="rg1", - virtual_network_gateway_connection_name="conn1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 95f629801428..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_reset_shared_key.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_gateway_connections.begin_reset_shared_key( - resource_group_name="rg1", - virtual_network_gateway_connection_name="conn1", - parameters={"keyLength": 128}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 598e7c67c042..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_set_shared_key.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_gateway_connections.begin_set_shared_key( - resource_group_name="rg1", - virtual_network_gateway_connection_name="connS2S", - parameters={"value": "AzureAbc123"}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 65e1d6a7e44e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_start_packet_capture.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_gateway_connections.begin_start_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_connection_name="vpngwcn1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1040528e6b9a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_start_packet_capture_filter_data.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_gateway_connections.begin_start_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_connection_name="vpngwcn1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 634cf5791710..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_stop_packet_capture.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_gateway_connections.begin_stop_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_connection_name="vpngwcn1", - parameters={ - "sasUrl": "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D" - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0b9988781939..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connection_update_tags.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_gateway_connections.begin_update_tags( - resource_group_name="rg1", - virtual_network_gateway_connection_name="test", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f838ab649dfe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_connections_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="subid", - ) - - response = client.virtual_network_gateway_connections.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 49a4b29508f4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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="subid", - ) - - client.virtual_network_gateways.begin_delete( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cd57b09fb697..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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.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.get( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d6f7d45b82aa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_advertised_routes.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_advertised_routes( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6bd7638d4182..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_bgp_peer_status.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_bgp_peer_status( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.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 deleted file mode 100644 index 4d631cb4508d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_vpn_client_ipsec_parameters.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_vpnclient_ipsec_parameters( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 580077e0a764..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_vpn_profile_package_url.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_vpn_profile_package_url( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4111214cc242..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_vpnclient_connection_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.virtual_network_gateways.begin_get_vpnclient_connection_health( - resource_group_name="p2s-vnet-test", - virtual_network_gateway_name="vpnp2sgw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 240e82e792cf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_learned_routes.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_learned_routes( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7eb84bbc8016..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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="subid", - ) - - response = client.virtual_network_gateways.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6cbceb74d81a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_nat_rule_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="subid", - ) - - client.virtual_network_gateway_nat_rules.begin_delete( - resource_group_name="rg1", - virtual_network_gateway_name="gateway1", - nat_rule_name="natRule1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7dc708c9fa6e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_nat_rule_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="subid", - ) - - response = client.virtual_network_gateway_nat_rules.get( - resource_group_name="rg1", - virtual_network_gateway_name="gateway1", - nat_rule_name="natRule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ba3af00fd910..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_nat_rule_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="subid", - ) - - response = client.virtual_network_gateway_nat_rules.list_by_virtual_network_gateway( - resource_group_name="rg1", - virtual_network_gateway_name="gateway1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkGatewayNatRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_put.py deleted file mode 100644 index 3815dcb78850..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_put.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_nat_rule_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="subid", - ) - - response = client.virtual_network_gateway_nat_rules.begin_create_or_update( - resource_group_name="rg1", - virtual_network_gateway_name="gateway1", - nat_rule_name="natRule1", - nat_rule_parameters={ - "properties": { - "externalMappings": [{"addressSpace": "192.168.21.0/24", "portRange": "300-400"}], - "internalMappings": [{"addressSpace": "10.4.0.0/24", "portRange": "200-300"}], - "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", - "mode": "EgressSnat", - "type": "Static", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkGatewayNatRulePut.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 deleted file mode 100644 index c02b2352f561..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_reset.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_reset( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c0d49349375e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_reset_vpn_client_shared_key.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", - ) - - client.virtual_network_gateways.begin_reset_vpn_client_shared_key( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 033c69bef497..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_set_vpn_client_ipsec_parameters.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_set_vpnclient_ipsec_parameters( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - vpnclient_ipsec_params={ - "dhGroup": "DHGroup2", - "ikeEncryption": "AES256", - "ikeIntegrity": "SHA384", - "ipsecEncryption": "AES256", - "ipsecIntegrity": "SHA256", - "pfsGroup": "PFS2", - "saDataSizeKilobytes": 429497, - "saLifeTimeSeconds": 86473, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a79ad00c9100..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_packet_capture.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_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e5e0814fefa2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_packet_capture_filter_data.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_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.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 deleted file mode 100644 index 86a68bc81fa0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_packet_capture.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_packet_capture( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - parameters={ - "sasUrl": "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D" - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkGatewayStopPacketCapture.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 deleted file mode 100644 index f17dfeab6ff9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_supported_vpn_device.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.supported_vpn_devices( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a89b44743a47..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_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="subid", - ) - - response = client.virtual_network_gateways.begin_create_or_update( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - parameters={ - "location": "centralus", - "properties": { - "activeActive": False, - "allowRemoteVnetTraffic": False, - "allowVirtualWanTraffic": False, - "bgpSettings": {"asn": 65515, "bgpPeeringAddress": "10.0.1.30", "peerWeight": 0}, - "customRoutes": {"addressPrefixes": ["101.168.0.6/32"]}, - "disableIPSecReplayProtection": False, - "enableBgp": False, - "enableBgpRouteTranslationForNat": False, - "enableDnsForwarding": True, - "gatewayType": "Vpn", - "ipConfigurations": [ - { - "name": "gwipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip" - }, - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet" - }, - }, - } - ], - "natRules": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", - "name": "natRule1", - "properties": { - "externalMappings": [{"addressSpace": "50.0.0.0/24"}], - "internalMappings": [{"addressSpace": "10.10.0.0/24"}], - "ipConfigurationId": "", - "mode": "EgressSnat", - "type": "Static", - }, - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", - "name": "natRule2", - "properties": { - "externalMappings": [{"addressSpace": "30.0.0.0/24"}], - "internalMappings": [{"addressSpace": "20.10.0.0/24"}], - "ipConfigurationId": "", - "mode": "IngressSnat", - "type": "Static", - }, - }, - ], - "sku": {"name": "VpnGw1", "tier": "VpnGw1"}, - "vpnClientConfiguration": { - "radiusServers": [ - { - "radiusServerAddress": "10.2.0.0", - "radiusServerScore": 20, - "radiusServerSecret": "radiusServerSecret", - } - ], - "vpnClientProtocols": ["OpenVPN"], - "vpnClientRevokedCertificates": [], - "vpnClientRootCertificates": [], - }, - "vpnType": "RouteBased", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 8fd5f06212ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_update_tags.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_update_tags( - resource_group_name="rg1", - virtual_network_gateway_name="vpngw", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 300b8c9b6081..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from 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_vpn_device_configuration_script.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.vpn_device_configuration_script( - resource_group_name="rg1", - virtual_network_gateway_connection_name="vpngw", - parameters={"deviceFamily": "ISR", "firmwareVersion": "IOS 15.1 (Preview)", "vendor": "Cisco"}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cb9d01c36017..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_gateways_disconnect_p2s_vpn_connections.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", - ) - - client.virtual_network_gateways.begin_disconnect_virtual_network_gateway_vpn_connections( - resource_group_name="vpn-gateway-test", - virtual_network_gateway_name="vpngateway", - request={"vpnConnectionIds": ["vpnconnId1", "vpnconnId2"]}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9bc1df66f935..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_gateways_list_connections.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.list_connections( - resource_group_name="testrg", - virtual_network_gateway_name="test-vpn-gateway-1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a560940c95c3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_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="subid", - ) - - response = client.virtual_networks.get( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0e6bc0d8823b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_get_ddos_protection_status.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_list_ddos_protection_status( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ).result() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fd2fbcbde2e4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_get_resource_navigation_links.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.resource_navigation_links.list( - resource_group_name="rg1", - virtual_network_name="vnet", - subnet_name="subnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 34e93d784fb1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_get_service_association_links.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.service_association_links.list( - resource_group_name="rg1", - virtual_network_name="vnet", - subnet_name="subnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 280fca5e8f24..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_get_with_service_association_link.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.get( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index ebf644ca6bc7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_get_with_subnet_delegation.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.get( - resource_group_name="rg1", - virtual_network_name="test-vnet", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c18ce174e99f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_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="subid", - ) - - response = client.virtual_networks.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 05e4fbd484c7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_list_all.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.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f60c5f1f5cde..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_list_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="subid", - ) - - response = client.virtual_networks.list_usage( - resource_group_name="rg1", - virtual_network_name="vnetName", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkListUsage.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create.py deleted file mode 100644 index 95d0ee10333e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_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="subid", - ) - - response = client.virtual_network_peerings.begin_create_or_update( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - virtual_network_peering_parameters={ - "properties": { - "allowForwardedTraffic": True, - "allowGatewayTransit": False, - "allowVirtualNetworkAccess": True, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" - }, - "useRemoteGateways": False, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkPeeringCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create_with_remote_virtual_network_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create_with_remote_virtual_network_encryption.py deleted file mode 100644 index bd12813ed10d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_create_with_remote_virtual_network_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_create_with_remote_virtual_network_encryption.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_peerings.begin_create_or_update( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - virtual_network_peering_parameters={ - "properties": { - "allowForwardedTraffic": True, - "allowGatewayTransit": False, - "allowVirtualNetworkAccess": True, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" - }, - "useRemoteGateways": False, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.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 deleted file mode 100644 index c4adc37c77e9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_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="subid", - ) - - client.virtual_network_peerings.begin_delete( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 7892d35792dc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_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="subid", - ) - - response = client.virtual_network_peerings.get( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index bddedc2bbe9e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_get_with_remote_virtual_network_encryption.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_peerings.get( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index cb742925f08b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_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="subid", - ) - - response = client.virtual_network_peerings.list( - resource_group_name="peerTest", - virtual_network_name="vnet1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9b078410c85d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_list_with_remote_virtual_network_encryption.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_peerings.list( - resource_group_name="peerTest", - virtual_network_name="vnet1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_sync.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_sync.py deleted file mode 100644 index 335494370b91..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_peering_sync.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_peerings.begin_create_or_update( - resource_group_name="peerTest", - virtual_network_name="vnet1", - virtual_network_peering_name="peer", - virtual_network_peering_parameters={ - "properties": { - "allowForwardedTraffic": True, - "allowGatewayTransit": False, - "allowVirtualNetworkAccess": True, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" - }, - "useRemoteGateways": False, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkPeeringSync.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 deleted file mode 100644 index 4f48ddbf5028..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_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="subid", - ) - - response = client.virtual_network_taps.begin_create_or_update( - resource_group_name="rg1", - tap_name="test-vtap", - parameters={ - "location": "centraluseuap", - "properties": { - "destinationNetworkInterfaceIPConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1" - } - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index c12a79e21f54..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_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="subid", - ) - - client.virtual_network_taps.begin_delete( - resource_group_name="rg1", - tap_name="test-vtap", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4735e188d039..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_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="subid", - ) - - response = client.virtual_network_taps.get( - resource_group_name="rg1", - tap_name="testvtap", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 5eb68f8aa622..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_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="subid", - ) - - response = client.virtual_network_taps.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f43919b7a504..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_list_all.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_taps.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 685794618241..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_tap_update_tags.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_taps.update_tags( - resource_group_name="rg1", - tap_name="test-vtap", - tap_parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 226987df3e6b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_update_tags.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.update_tags( - resource_group_name="rg1", - virtual_network_name="test-vnet", - parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualNetworkUpdateTags.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 deleted file mode 100644 index e83ae51dee45..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_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="subid", - ) - - client.virtual_routers.begin_delete( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1ce5ac5d2f22..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_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="subid", - ) - - response = client.virtual_routers.get( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 90c4236079a1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_list_by_resource_group.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_routers.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 56681ff7ed37..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_list_by_subscription.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_routers.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 26390ea33e55..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peer_list_advertised_route.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_hub_bgp_connections.begin_list_advertised_routes( - resource_group_name="rg1", - hub_name="virtualRouter1", - connection_name="peer1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 98b91d24dee7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peer_list_learned_route.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_hub_bgp_connections.begin_list_learned_routes( - resource_group_name="rg1", - hub_name="virtualRouter1", - connection_name="peer1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9f874646f51f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peering_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="subid", - ) - - client.virtual_router_peerings.begin_delete( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - peering_name="peering1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2e4b10b3a2ab..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peering_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="subid", - ) - - response = client.virtual_router_peerings.get( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - peering_name="peering1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9ae127af76d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peering_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="subid", - ) - - response = client.virtual_router_peerings.list( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index fb529cc5ca77..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_peering_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="subid", - ) - - response = client.virtual_router_peerings.begin_create_or_update( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - peering_name="peering1", - parameters={"properties": {"peerAsn": 20000, "peerIp": "192.168.1.5"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index beeed2c04a04..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_router_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="subid", - ) - - response = client.virtual_routers.begin_create_or_update( - resource_group_name="rg1", - virtual_router_name="virtualRouter", - parameters={ - "location": "West US", - "properties": { - "hostedGateway": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway" - } - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e60b8ad53457..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_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="subid", - ) - - client.virtual_wans.begin_delete( - resource_group_name="rg1", - virtual_wan_name="virtualWan1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 0e65d6df4a9e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_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="subid", - ) - - response = client.virtual_wans.get( - resource_group_name="rg1", - virtual_wan_name="wan1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b76732170c9d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_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="subid", - ) - - response = client.virtual_wans.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 68ff461286ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_list_by_resource_group.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_wans.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index adb3c9bd3912..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_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="subid", - ) - - response = client.virtual_wans.begin_create_or_update( - resource_group_name="rg1", - virtual_wan_name="wan1", - wan_parameters={ - "location": "West US", - "properties": {"disableVpnEncryption": False, "type": "Basic"}, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 29f4de8cc21f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_supported_security_providers.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.supported_security_providers( - resource_group_name="rg1", - virtual_wan_name="wan1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 017b8e5bde26..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_wan_update_tags.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_wans.update_tags( - resource_group_name="rg1", - virtual_wan_name="wan1", - wan_parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VirtualWANUpdateTags.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 deleted file mode 100644 index e55f7e5ac302..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_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="subid", - ) - - client.vpn_connections.begin_delete( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 06785c467ea8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_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="subid", - ) - - response = client.vpn_connections.get( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 885363bb0f8c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_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="subid", - ) - - response = client.vpn_connections.list_by_vpn_gateway( - resource_group_name="rg1", - gateway_name="gateway1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_put.py deleted file mode 100644 index df625b965170..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_put.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_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="subid", - ) - - response = client.vpn_connections.begin_create_or_update( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - vpn_connection_parameters={ - "properties": { - "remoteVpnSite": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1" - }, - "routingConfiguration": { - "associatedRouteTable": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1" - }, - "inboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1" - }, - "outboundRouteMap": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2" - }, - "propagatedRouteTables": { - "ids": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1" - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2" - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3" - }, - ], - "labels": ["label1", "label2"], - }, - }, - "trafficSelectorPolicies": [], - "vpnLinkConnections": [ - { - "name": "Connection-Link1", - "properties": { - "connectionBandwidth": 200, - "sharedKey": "key", - "usePolicyBasedTrafficSelectors": False, - "vpnConnectionProtocolType": "IKEv2", - "vpnLinkConnectionMode": "Default", - "vpnSiteLink": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1" - }, - }, - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnConnectionPut.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 deleted file mode 100644 index 2eab7fb7c29c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_start_packet_capture.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.vpn_connections.begin_start_packet_capture( - resource_group_name="rg1", - gateway_name="gateway1", - vpn_connection_name="vpnConnection1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 56cae892a707..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_start_packet_capture_filter_data.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.vpn_connections.begin_start_packet_capture( - resource_group_name="rg1", - gateway_name="gateway1", - vpn_connection_name="vpnConnection1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 11586f4118c9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_connection_stop_packet_capture.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.vpn_connections.begin_stop_packet_capture( - resource_group_name="rg1", - gateway_name="gateway1", - vpn_connection_name="vpnConnection1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index f2fa22befd2d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_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="subid", - ) - - client.vpn_gateways.begin_delete( - resource_group_name="rg1", - gateway_name="gateway1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index b6392422b36e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_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="subid", - ) - - response = client.vpn_gateways.get( - resource_group_name="rg1", - gateway_name="gateway1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 4edc93c72ebb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_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="subid", - ) - - response = client.vpn_gateways.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 863bde6eee0f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_list_by_resource_group.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.vpn_gateways.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 74ebdda37731..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_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="subid", - ) - - response = client.vpn_gateways.begin_create_or_update( - resource_group_name="rg1", - gateway_name="gateway1", - vpn_gateway_parameters={ - "location": "westcentralus", - "properties": { - "bgpSettings": { - "asn": 65515, - "bgpPeeringAddresses": [ - {"customBgpIpAddresses": ["169.254.21.5"], "ipconfigurationId": "Instance0"}, - {"customBgpIpAddresses": ["169.254.21.10"], "ipconfigurationId": "Instance1"}, - ], - "peerWeight": 0, - }, - "connections": [ - { - "name": "vpnConnection1", - "properties": { - "remoteVpnSite": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1" - }, - "vpnLinkConnections": [ - { - "name": "Connection-Link1", - "properties": { - "connectionBandwidth": 200, - "egressNatRules": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03" - } - ], - "sharedKey": "key", - "vpnConnectionProtocolType": "IKEv2", - "vpnSiteLink": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1" - }, - }, - } - ], - }, - } - ], - "enableBgpRouteTranslationForNat": False, - "isRoutingPreferenceInternet": False, - "natRules": [ - { - "name": "nat03", - "properties": { - "externalMappings": [{"addressSpace": "192.168.0.0/26"}], - "internalMappings": [{"addressSpace": "0.0.0.0/26"}], - "ipConfigurationId": "", - "mode": "EgressSnat", - "type": "Static", - }, - } - ], - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 664a89d3fa11..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_reset.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.vpn_gateways.begin_reset( - resource_group_name="rg1", - gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d5911f5ce2f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_start_packet_capture.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.vpn_gateways.begin_start_packet_capture( - resource_group_name="rg1", - gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 9022c3bbe398..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_start_packet_capture_filter_data.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.vpn_gateways.begin_start_packet_capture( - resource_group_name="rg1", - gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 48d0adf0a4cd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_stop_packet_capture.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.vpn_gateways.begin_stop_packet_capture( - resource_group_name="rg1", - gateway_name="vpngw", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 3d67890936a7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_gateway_update_tags.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.vpn_gateways.begin_update_tags( - resource_group_name="rg1", - gateway_name="gateway1", - vpn_gateway_parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 02b75b611471..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_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="subid", - ) - - client.vpn_server_configurations.begin_delete( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6fd8892e1d62..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_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="subid", - ) - - response = client.vpn_server_configurations.get( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 6245eaf186a0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_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="subid", - ) - - response = client.vpn_server_configurations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 51c3839e8675..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_list_by_resource_group.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.vpn_server_configurations.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnServerConfigurationListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_put.py deleted file mode 100644 index ee21380e15ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_put.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_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="subid", - ) - - response = client.vpn_server_configurations.begin_create_or_update( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - vpn_server_configuration_parameters={ - "location": "West US", - "properties": { - "configurationPolicyGroups": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1", - "name": "policyGroup1", - "properties": { - "isDefault": True, - "policyMembers": [ - {"attributeType": "RadiusAzureGroupId", "attributeValue": "6ad1bd08", "name": "policy1"} - ], - "priority": 0, - }, - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2", - "name": "policyGroup2", - "properties": { - "isDefault": True, - "policyMembers": [ - {"attributeType": "CertificateGroupId", "attributeValue": "red.com", "name": "policy2"} - ], - "priority": 0, - }, - }, - ], - "radiusClientRootCertificates": [ - { - "name": "vpnServerConfigRadiusClientRootCert1", - "thumbprint": "83FFBFC8848B5A5836C94D0112367E16148A286F", - } - ], - "radiusServerRootCertificates": [ - { - "name": "vpnServerConfigRadiusServerRootCer1", - "publicCertData": "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM", - } - ], - "radiusServers": [ - { - "radiusServerAddress": "10.0.0.0", - "radiusServerScore": 25, - "radiusServerSecret": "radiusServerSecret", - } - ], - "vpnClientIpsecPolicies": [ - { - "dhGroup": "DHGroup14", - "ikeEncryption": "AES256", - "ikeIntegrity": "SHA384", - "ipsecEncryption": "AES256", - "ipsecIntegrity": "SHA256", - "pfsGroup": "PFS14", - "saDataSizeKilobytes": 429497, - "saLifeTimeSeconds": 86472, - } - ], - "vpnClientRevokedCertificates": [ - { - "name": "vpnServerConfigVpnClientRevokedCert1", - "thumbprint": "83FFBFC8848B5A5836C94D0112367E16148A286F", - } - ], - "vpnClientRootCertificates": [ - { - "name": "vpnServerConfigVpnClientRootCert1", - "publicCertData": "MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN", - } - ], - "vpnProtocols": ["IkeV2"], - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnServerConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_update_tags.py deleted file mode 100644 index cecec575bad4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_server_configuration_update_tags.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.vpn_server_configurations.update_tags( - resource_group_name="rg1", - vpn_server_configuration_name="vpnServerConfiguration1", - vpn_server_configuration_parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnServerConfigurationUpdateTags.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 deleted file mode 100644 index d8a058b2db5a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_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="subid", - ) - - client.vpn_sites.begin_delete( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index a6bc45141987..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_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="subid", - ) - - response = client.vpn_sites.get( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnSiteGet.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 deleted file mode 100644 index 7a05ee4989c7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_connection_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="subid", - ) - - response = client.vpn_site_link_connections.get( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - link_connection_name="Connection-Link1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 18b52d932745..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_connection_get_ike_sas.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.vpn_link_connections.begin_get_ike_sas( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - link_connection_name="Connection-Link1", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 1c2cf51bdbad..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_connection_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="subid", - ) - - response = client.vpn_link_connections.list_by_vpn_connection( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2098615179c8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_connection_reset.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", - ) - - client.vpn_link_connections.begin_reset_connection( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - link_connection_name="Connection-Link1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnSiteLinkConnectionReset.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 deleted file mode 100644 index 7d84cddc2958..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_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="subid", - ) - - response = client.vpn_site_links.get( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - vpn_site_link_name="vpnSiteLink1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 986434342f0e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_link_list_by_vpn_site.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.vpn_site_links.list_by_vpn_site( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 66f59adbb274..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_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="subid", - ) - - response = client.vpn_sites.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2ef6c2ff1f27..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_list_by_resource_group.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.vpn_sites.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnSiteListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_put.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_put.py deleted file mode 100644 index 10be4c5ade10..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_put.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_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="subid", - ) - - response = client.vpn_sites.begin_create_or_update( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - vpn_site_parameters={ - "location": "West US", - "properties": { - "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, - "isSecuritySite": False, - "o365Policy": {"breakOutCategories": {"allow": True, "default": False, "optimize": True}}, - "virtualWan": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1" - }, - "vpnSiteLinks": [ - { - "name": "vpnSiteLink1", - "properties": { - "bgpProperties": {"asn": 1234, "bgpPeeringAddress": "192.168.0.0"}, - "fqdn": "link1.vpnsite1.contoso.com", - "ipAddress": "50.50.50.56", - "linkProperties": {"linkProviderName": "vendor1", "linkSpeedInMbps": 0}, - }, - } - ], - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnSitePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_update_tags.py deleted file mode 100644 index 911895b616cb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_site_update_tags.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.vpn_sites.update_tags( - resource_group_name="rg1", - vpn_site_name="vpnSite1", - vpn_site_parameters={"tags": {"key1": "value1", "key2": "value2"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/VpnSiteUpdateTags.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 deleted file mode 100644 index b73d0a7425d4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python vpn_sites_configuration_download.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", - ) - - client.vpn_sites_configuration.begin_download( - resource_group_name="rg1", - virtual_wan_name="wan1", - request={ - "outputBlobSasUrl": "https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b", - "vpnSites": ["/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc"], - }, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dc27e21a0f73..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python waf_list_all_policies.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.web_application_firewall_policies.list_all() - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index dc5fdace7074..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python waf_list_policies.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.web_application_firewall_policies.list( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index d672f3995a82..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python waf_policy_create_or_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="subid", - ) - - response = client.web_application_firewall_policies.create_or_update( - resource_group_name="rg1", - policy_name="Policy1", - parameters={ - "location": "WestUs", - "properties": { - "customRules": [ - { - "action": "Block", - "matchConditions": [ - { - "matchValues": ["192.168.1.0/24", "10.0.0.0/24"], - "matchVariables": [{"selector": None, "variableName": "RemoteAddr"}], - "operator": "IPMatch", - } - ], - "name": "Rule1", - "priority": 1, - "ruleType": "MatchRule", - }, - { - "action": "Block", - "matchConditions": [ - { - "matchValues": ["192.168.1.0/24"], - "matchVariables": [{"selector": None, "variableName": "RemoteAddr"}], - "operator": "IPMatch", - }, - { - "matchValues": ["Windows"], - "matchVariables": [{"selector": "UserAgent", "variableName": "RequestHeaders"}], - "operator": "Contains", - }, - ], - "name": "Rule2", - "priority": 2, - "ruleType": "MatchRule", - }, - { - "action": "Block", - "groupByUserSession": [{"groupByVariables": [{"variableName": "ClientAddr"}]}], - "matchConditions": [ - { - "matchValues": ["192.168.1.0/24", "10.0.0.0/24"], - "matchVariables": [{"selector": None, "variableName": "RemoteAddr"}], - "negationConditon": True, - "operator": "IPMatch", - } - ], - "name": "RateLimitRule3", - "priority": 3, - "rateLimitDuration": "OneMin", - "rateLimitThreshold": 10, - "ruleType": "RateLimitRule", - }, - ], - "managedRules": { - "exclusions": [ - { - "exclusionManagedRuleSets": [ - { - "ruleGroups": [ - { - "ruleGroupName": "REQUEST-930-APPLICATION-ATTACK-LFI", - "rules": [{"ruleId": "930120"}], - }, - {"ruleGroupName": "REQUEST-932-APPLICATION-ATTACK-RCE"}, - ], - "ruleSetType": "OWASP", - "ruleSetVersion": "3.2", - } - ], - "matchVariable": "RequestArgNames", - "selector": "hello", - "selectorMatchOperator": "StartsWith", - }, - { - "exclusionManagedRuleSets": [ - {"ruleGroups": [], "ruleSetType": "OWASP", "ruleSetVersion": "3.1"} - ], - "matchVariable": "RequestArgNames", - "selector": "hello", - "selectorMatchOperator": "EndsWith", - }, - {"matchVariable": "RequestArgNames", "selector": "test", "selectorMatchOperator": "StartsWith"}, - { - "matchVariable": "RequestArgValues", - "selector": "test", - "selectorMatchOperator": "StartsWith", - }, - ], - "managedRuleSets": [ - { - "ruleGroupOverrides": [ - { - "ruleGroupName": "REQUEST-931-APPLICATION-ATTACK-RFI", - "rules": [ - {"action": "Log", "ruleId": "931120", "state": "Enabled"}, - {"action": "AnomalyScoring", "ruleId": "931130", "state": "Disabled"}, - ], - } - ], - "ruleSetType": "OWASP", - "ruleSetVersion": "3.2", - } - ], - }, - "policySettings": { - "logScrubbing": { - "scrubbingRules": [ - { - "matchVariable": "RequestArgNames", - "selector": "test", - "selectorMatchOperator": "Equals", - "state": "Enabled", - }, - { - "matchVariable": "RequestIPAddress", - "selectorMatchOperator": "EqualsAny", - "state": "Enabled", - }, - ], - "state": "Enabled", - } - }, - }, - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index e09d60954a8a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python waf_policy_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="subid", - ) - - client.web_application_firewall_policies.begin_delete( - resource_group_name="rg1", - policy_name="Policy1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-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 deleted file mode 100644 index 2a0a339a3f7f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python waf_policy_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="subid", - ) - - response = client.web_application_firewall_policies.get( - resource_group_name="rg1", - policy_name="Policy1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-02-01/examples/WafPolicyGet.json -if __name__ == "__main__": - main()