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 5d7e66d2c678..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_request_headers_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_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/2024-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_get.py deleted file mode 100644 index c0c9995b8666..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_response_headers_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_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/2024-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_get.py deleted file mode 100644 index 4f9bed8eff2f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_server_variables_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_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/2024-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_get.py deleted file mode 100644 index c3b0480b6b2f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_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_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/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_get.py deleted file mode 100644 index 3ecbc2f2bcd7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policies_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_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/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_policy_get.py deleted file mode 100644 index 8b2288dca908..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_ssl_options_predefined_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 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/2024-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_get.py deleted file mode 100644 index 31febe3ae36e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_available_waf_rule_sets_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_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/2024-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_get.py deleted file mode 100644 index 3970b5325ce6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_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_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/2024-05-01/examples/ApplicationGatewayBackendHealthGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.py deleted file mode 100644 index 34a84afee543..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_backend_health_test.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_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/2024-05-01/examples/ApplicationGatewayBackendHealthTest.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py deleted file mode 100644 index b050b0ec3b85..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_create.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/ApplicationGatewayCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_delete.py deleted file mode 100644 index cebe57f1f8e1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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_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/2024-05-01/examples/ApplicationGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_get.py deleted file mode 100644 index 4258a50fd0c6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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_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/2024-05-01/examples/ApplicationGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list.py deleted file mode 100644 index 92aed4b3abba..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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_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/2024-05-01/examples/ApplicationGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.py deleted file mode 100644 index 1ad3a940d3f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_list_all.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_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/2024-05-01/examples/ApplicationGatewayListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_delete.py deleted file mode 100644 index c07dc77bc3c2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_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 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/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_get.py deleted file mode 100644 index d49dbd85707e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_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 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/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_list.py deleted file mode 100644 index a0e5c54b886d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_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 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/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.py deleted file mode 100644 index c92a07c14808..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_endpoint_connection_update.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 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/2024-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_list.py deleted file mode 100644 index 0c1e602d5cd5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_private_link_resource_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 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/2024-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_start.py deleted file mode 100644 index 2d960b9690a5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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 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/2024-05-01/examples/ApplicationGatewayStart.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_stop.py deleted file mode 100644 index 0890d92857b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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 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/2024-05-01/examples/ApplicationGatewayStop.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/application_gateway_update_tags.py deleted file mode 100644 index f147e7b27ec6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_gateway_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 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/2024-05-01/examples/ApplicationGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_create.py deleted file mode 100644 index 70674fa22fe2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_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 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/2024-05-01/examples/ApplicationSecurityGroupCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_delete.py deleted file mode 100644 index 74ed3d397922..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_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 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/2024-05-01/examples/ApplicationSecurityGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_get.py deleted file mode 100644 index 57f9853d8385..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_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 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/2024-05-01/examples/ApplicationSecurityGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list.py deleted file mode 100644 index cb06131ddb2e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_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 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/2024-05-01/examples/ApplicationSecurityGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.py deleted file mode 100644 index 9925840724b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_list_all.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_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/2024-05-01/examples/ApplicationSecurityGroupListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/application_security_group_update_tags.py deleted file mode 100644 index 57fffae16c2d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/application_security_group_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 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/2024-05-01/examples/ApplicationSecurityGroupUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_get.py deleted file mode 100644 index 43b89183a9ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_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_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/2024-05-01/examples/AutoApprovedPrivateLinkServicesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_get.py deleted file mode 100644 index 8dd2a89a25c6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/auto_approved_private_link_services_resource_group_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 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/2024-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_get.py deleted file mode 100644 index 668795b47c08..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_resource_group_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 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/2024-05-01/examples/AvailableDelegationsResourceGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_get.py deleted file mode 100644 index b3c5c4716ff0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_delegations_subscription_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_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/2024-05-01/examples/AvailableDelegationsSubscriptionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_get.py deleted file mode 100644 index a2e5e2a123ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_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_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/2024-05-01/examples/AvailablePrivateEndpointTypesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_get.py deleted file mode 100644 index 06f523068c0a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_private_endpoint_types_resource_group_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 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/2024-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list.py deleted file mode 100644 index 0dbb43da96d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_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 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/2024-05-01/examples/AvailableServiceAliasesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.py deleted file mode 100644 index 55994143d535..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/available_service_aliases_list_by_resource_group.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 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/2024-05-01/examples/AvailableServiceAliasesListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_delete.py deleted file mode 100644 index 88f34c260244..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_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 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/2024-05-01/examples/AzureFirewallDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.py deleted file mode 100644 index b05cc5a7636a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_fqdn_tags_list_by_subscription.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_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/2024-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get.py deleted file mode 100644 index 2cdfa6215357..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_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 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/2024-05-01/examples/AzureFirewallGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.py deleted file mode 100644 index f2b4eeb1750b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_additional_properties.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_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/2024-05-01/examples/AzureFirewallGetWithAdditionalProperties.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.py deleted file mode 100644 index 79efbf50e6fa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_ip_groups.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_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/2024-05-01/examples/AzureFirewallGetWithIpGroups.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.py deleted file mode 100644 index bc6f8cadcf61..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_mgmt_subnet.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_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/2024-05-01/examples/AzureFirewallGetWithMgmtSubnet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.py deleted file mode 100644 index c1aa6c4f5ddd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_get_with_zones.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_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/2024-05-01/examples/AzureFirewallGetWithZones.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_resource_group.py deleted file mode 100644 index 035ca09f7265..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_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 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/2024-05-01/examples/AzureFirewallListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.py deleted file mode 100644 index e7c24ea578ec..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_by_subscription.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_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/2024-05-01/examples/AzureFirewallListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.py deleted file mode 100644 index 2539129e0345..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_list_learned_ip_prefixes.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_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/2024-05-01/examples/AzureFirewallListLearnedIPPrefixes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.py deleted file mode 100644 index 4dd1437e225a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_packet_capture.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 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={ - "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/2024-05-01/examples/AzureFirewallPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py deleted file mode 100644 index 54f2bdccc79d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - "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/2024-05-01/examples/AzureFirewallPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.py deleted file mode 100644 index 67cf7ebc15d8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_in_hub.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_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/2024-05-01/examples/AzureFirewallPutInHub.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py deleted file mode 100644 index 48496886a0a8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_additional_properties.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - "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/2024-05-01/examples/AzureFirewallPutWithAdditionalProperties.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py deleted file mode 100644 index 745f7c57e07a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_ip_groups.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - "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/2024-05-01/examples/AzureFirewallPutWithIpGroups.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py deleted file mode 100644 index 8bb1283feebe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_mgmt_subnet.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - "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/2024-05-01/examples/AzureFirewallPutWithMgmtSubnet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py deleted file mode 100644 index 4fefe4fc5295..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_put_with_zones.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/applicationRuleCollections/apprulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/natRuleCollections/natrulecoll", - "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": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall/networkRuleCollections/netrulecoll", - "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/2024-05-01/examples/AzureFirewallPutWithZones.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_update_tags.py deleted file mode 100644 index bf343fe9002e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_firewall_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 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/2024-05-01/examples/AzureFirewallUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.py deleted file mode 100644 index 67096575a821..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_categories_list_by_subscription.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_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/2024-05-01/examples/AzureWebCategoriesListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py b/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_get.py deleted file mode 100644 index 506597d09e8d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/azure_web_category_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_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/2024-05-01/examples/AzureWebCategoryGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_delete.py deleted file mode 100644 index b734f7e7818d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_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 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/2024-05-01/examples/BastionHostDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_delete.py deleted file mode 100644 index 26d7e39aa033..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_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 bastion_host_developer_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="rg2", - bastion_host_name="bastionhostdeveloper", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_get.py deleted file mode 100644 index 872cf541ff91..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_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 bastion_host_developer_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="bastionhostdeveloper'", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_put.py deleted file mode 100644 index 5729723c65d7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_developer_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 bastion_host_developer_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="rg2", - bastion_host_name="bastionhostdeveloper", - parameters={ - "properties": { - "ipConfigurations": [], - "networkAcls": {"ipRules": [{"addressPrefix": "1.1.1.1/16"}]}, - "virtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet2" - }, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostDeveloperPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get.py deleted file mode 100644 index b561eb2e5334..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_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 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/2024-05-01/examples/BastionHostGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.py deleted file mode 100644 index 015b6cabb806..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_private_only.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_get_with_private_only.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.bastion_hosts.get( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.py deleted file mode 100644 index 55562d4b1210..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_get_with_zones.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_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.bastion_hosts.get( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithZones.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_resource_group.py deleted file mode 100644 index 1d29f7ba87b8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_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 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/2024-05-01/examples/BastionHostListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.py deleted file mode 100644 index a9ec59bc29d8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_list_by_subscription.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_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/2024-05-01/examples/BastionHostListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.py deleted file mode 100644 index 64b9150bb7f0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_patch.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_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/2024-05-01/examples/BastionHostPatch.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.py deleted file mode 100644 index 911ad5552e3d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put.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 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/2024-05-01/examples/BastionHostPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.py deleted file mode 100644 index 041edfe9e208..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_private_only.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 bastion_host_put_with_private_only.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.bastion_hosts.begin_create_or_update( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - parameters={ - "properties": { - "enablePrivateOnlyBastion": True, - "ipConfigurations": [ - { - "name": "bastionHostIpConfiguration", - "properties": { - "subnet": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet" - } - }, - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostPutWithPrivateOnly.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.py deleted file mode 100644 index 386eaf16f90d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_host_put_with_zones.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 bastion_host_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.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/2024-05-01/examples/BastionHostPutWithZones.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.py deleted file mode 100644 index 7c4bfa9cd8d2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_session_delete.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 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/2024-05-01/examples/BastionSessionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_list.py deleted file mode 100644 index 8ca429c16cbb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_sessions_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 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/2024-05-01/examples/BastionSessionsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_create.py deleted file mode 100644 index 7d6dd1c083b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_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 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/2024-05-01/examples/BastionShareableLinkCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.py deleted file mode 100644 index 045df1a405fc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete.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 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/2024-05-01/examples/BastionShareableLinkDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.py deleted file mode 100644 index aa29ed29c997..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_delete_by_token.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_shareable_link_delete_by_token.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, 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_by_token( - resource_group_name="rg1", - bastion_host_name="bastionhosttenant", - bsl_token_request={"tokens": ["abcd1234-efgh-hijk-5678-abcdefgh1234", "dcba4321-hgfe-kjih-8765-hgfedcba4321"]}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionShareableLinkDeleteByToken.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.py deleted file mode 100644 index fc1707cc78ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/bastion_shareable_link_get.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 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/2024-05-01/examples/BastionShareableLinkGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py b/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.py deleted file mode 100644 index 38a9708eac77..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_dns_name_availability.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_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", - domain_name_label="testdns", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/CheckDnsNameAvailability.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.py deleted file mode 100644 index 6c46b73b6b66..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility.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.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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/2024-05-01/examples/CheckPrivateLinkServiceVisibility.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.py deleted file mode 100644 index 89a9a9d39407..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/check_private_link_service_visibility_by_resource_group.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 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/2024-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_get.py deleted file mode 100644 index e4bf6388b4a6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_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 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/2024-05-01/examples/CloudServiceNetworkInterfaceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_network_interface_list.py deleted file mode 100644 index 675aaf53e086..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_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_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/2024-05-01/examples/CloudServiceNetworkInterfaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.py deleted file mode 100644 index 3c81ff2629f0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_get.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 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/2024-05-01/examples/CloudServicePublicIpGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.py deleted file mode 100644 index 90fc205a6d1f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_public_ip_list_all.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_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/2024-05-01/examples/CloudServicePublicIpListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_list.py deleted file mode 100644 index 29a4f9d90301..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_network_interface_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 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/2024-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_list.py deleted file mode 100644 index c36b15686a8e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_role_instance_public_ip_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 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/2024-05-01/examples/CloudServiceRoleInstancePublicIpList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_get.py deleted file mode 100644 index aa43e8d4ab72..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_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 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/2024-05-01/examples/CloudServiceSwapGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_list.py deleted file mode 100644 index 69c51da38ecc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_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_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/2024-05-01/examples/CloudServiceSwapList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py b/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.py deleted file mode 100644 index 7bdafbe4569c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/cloud_service_swap_put.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_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/2024-05-01/examples/CloudServiceSwapPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_delete.py deleted file mode 100644 index 81f282cbf3a7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_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 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/2024-05-01/examples/ConfigurationPolicyGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_get.py deleted file mode 100644 index 694098fe9d63..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_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 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/2024-05-01/examples/ConfigurationPolicyGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py b/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.py deleted file mode 100644 index 78126e60061f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/configuration_policy_group_list_by_vpn_server_configuration.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 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/2024-05-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.py deleted file mode 100644 index ef3136a61d57..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_create_customized_values.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 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/2024-05-01/examples/CustomIpPrefixCreateCustomizedValues.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_delete.py deleted file mode 100644 index 80952dfbbc93..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_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 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/2024-05-01/examples/CustomIpPrefixDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_get.py deleted file mode 100644 index 9ca789eb9c3a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_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 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/2024-05-01/examples/CustomIpPrefixGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list.py deleted file mode 100644 index 3433082a9232..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_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 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/2024-05-01/examples/CustomIpPrefixList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.py deleted file mode 100644 index 2ed08cd66f81..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_list_all.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_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/2024-05-01/examples/CustomIpPrefixListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_update_tags.py deleted file mode 100644 index f78f41f2a597..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/custom_ip_prefix_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 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/2024-05-01/examples/CustomIpPrefixUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_create.py deleted file mode 100644 index f1a0cfe0b3a3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_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 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/2024-05-01/examples/DdosCustomPolicyCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_delete.py deleted file mode 100644 index 30a04b0901e4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_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 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/2024-05-01/examples/DdosCustomPolicyDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_get.py deleted file mode 100644 index ab7e3adf872f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_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 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/2024-05-01/examples/DdosCustomPolicyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_update_tags.py deleted file mode 100644 index 4eb970cd5017..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_custom_policy_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 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/2024-05-01/examples/DdosCustomPolicyUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_create.py deleted file mode 100644 index a3798bac6a5c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_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 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/2024-05-01/examples/DdosProtectionPlanCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_delete.py deleted file mode 100644 index b0bfa61ca89b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_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 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/2024-05-01/examples/DdosProtectionPlanDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_get.py deleted file mode 100644 index 01017bb8b8f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_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 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/2024-05-01/examples/DdosProtectionPlanGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list.py deleted file mode 100644 index 98e376c14c93..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_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 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/2024-05-01/examples/DdosProtectionPlanList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.py deleted file mode 100644 index ebfd7aab7ade..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_list_all.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_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/2024-05-01/examples/DdosProtectionPlanListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_update_tags.py deleted file mode 100644 index d4b03cf38e5a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ddos_protection_plan_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 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/2024-05-01/examples/DdosProtectionPlanUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_get.py deleted file mode 100644 index cc87ae7410fe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_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 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/2024-05-01/examples/DefaultSecurityRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_list.py deleted file mode 100644 index 34b6747d3906..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/default_security_rule_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 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/2024-05-01/examples/DefaultSecurityRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_create.py deleted file mode 100644 index b169fb964ebd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_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 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/2024-05-01/examples/DscpConfigurationCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_delete.py deleted file mode 100644 index c3c09f8aec02..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_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 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/2024-05-01/examples/DscpConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_get.py deleted file mode 100644 index c40070f86bd3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_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 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/2024-05-01/examples/DscpConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list.py deleted file mode 100644 index 5b6baea0ad97..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_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 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/2024-05-01/examples/DscpConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.py deleted file mode 100644 index 4aba83cf2576..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/dscp_configuration_list_all.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_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/2024-05-01/examples/DscpConfigurationListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_connection.py deleted file mode 100644 index 1cac55c07b50..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_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 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/2024-05-01/examples/EffectiveRoutesListForConnection.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.py deleted file mode 100644 index a4afe63284e6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_route_table.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 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/2024-05-01/examples/EffectiveRoutesListForRouteTable.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py b/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.py deleted file mode 100644 index 49051a63230e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/effective_routes_list_for_virtual_hub.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 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/2024-05-01/examples/EffectiveRoutesListForVirtualHub.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py b/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_list.py deleted file mode 100644 index ec492f14f8e3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/endpoint_services_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 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/2024-05-01/examples/EndpointServicesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_list.py deleted file mode 100644 index 494b518efc1e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_arp_table_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 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/2024-05-01/examples/ExpressRouteCircuitARPTableList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.py deleted file mode 100644 index 51a48a5fd25d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_create.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 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/2024-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_delete.py deleted file mode 100644 index aa27c9ad1d49..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_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_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/2024-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_get.py deleted file mode 100644 index c5071f59b230..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_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_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/2024-05-01/examples/ExpressRouteCircuitAuthorizationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_list.py deleted file mode 100644 index 16a49d625207..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_authorization_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_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/2024-05-01/examples/ExpressRouteCircuitAuthorizationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_create.py deleted file mode 100644 index 299d94282355..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_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 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/2024-05-01/examples/ExpressRouteCircuitConnectionCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_delete.py deleted file mode 100644 index 8581e278c595..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_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 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/2024-05-01/examples/ExpressRouteCircuitConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_get.py deleted file mode 100644 index 5645a425a663..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_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 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/2024-05-01/examples/ExpressRouteCircuitConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_list.py deleted file mode 100644 index 7bc9b005fd8d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_connection_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 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/2024-05-01/examples/ExpressRouteCircuitConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create.py deleted file mode 100644 index b4577aa4b4ce..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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_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/2024-05-01/examples/ExpressRouteCircuitCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.py deleted file mode 100644 index f9d19bb465d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_create_on_express_route_port.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_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, - "enableDirectPortRateLimit": False, - "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/2024-05-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_delete.py deleted file mode 100644 index 54e98ff17538..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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_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/2024-05-01/examples/ExpressRouteCircuitDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_get.py deleted file mode 100644 index bec453473ef9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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_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/2024-05-01/examples/ExpressRouteCircuitGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_resource_group.py deleted file mode 100644 index 261a6abae2e0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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 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/2024-05-01/examples/ExpressRouteCircuitListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.py deleted file mode 100644 index 6c01f08a0060..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_list_by_subscription.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_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/2024-05-01/examples/ExpressRouteCircuitListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_create.py deleted file mode 100644 index 6641e1fb6adf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_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_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/2024-05-01/examples/ExpressRouteCircuitPeeringCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_delete.py deleted file mode 100644 index c9f8e6fb80c3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_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_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/2024-05-01/examples/ExpressRouteCircuitPeeringDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_get.py deleted file mode 100644 index 380fc080d1f8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_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_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/2024-05-01/examples/ExpressRouteCircuitPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_list.py deleted file mode 100644 index d12f89f5eb71..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_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_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/2024-05-01/examples/ExpressRouteCircuitPeeringList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.py deleted file mode 100644 index d93ba2459d4e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_peering_stats.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_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/2024-05-01/examples/ExpressRouteCircuitPeeringStats.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_list.py deleted file mode 100644 index ef52b5edfe27..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_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 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/2024-05-01/examples/ExpressRouteCircuitRouteTableList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_list.py deleted file mode 100644 index 516602009ae5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_route_table_summary_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 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/2024-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_stats.py deleted file mode 100644 index c83dfdd395db..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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_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/2024-05-01/examples/ExpressRouteCircuitStats.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_update_tags.py deleted file mode 100644 index bfb7c3c05001..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_circuit_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 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/2024-05-01/examples/ExpressRouteCircuitUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py deleted file mode 100644 index e071ffb782af..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_create.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/ExpressRouteConnectionCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_delete.py deleted file mode 100644 index 1e47963bffc2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_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_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/2024-05-01/examples/ExpressRouteConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_get.py deleted file mode 100644 index 3473f17566ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_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_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/2024-05-01/examples/ExpressRouteConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_connection_list.py deleted file mode 100644 index 0b56eb847104..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_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 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/2024-05-01/examples/ExpressRouteConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_create.py deleted file mode 100644 index 7983d0481359..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_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_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/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_delete.py deleted file mode 100644 index 642165be4e26..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_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_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/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_get.py deleted file mode 100644 index 7a182f7a79b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_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_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/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_list.py deleted file mode 100644 index 59517444b1ab..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_bgp_peering_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_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/2024-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_get.py deleted file mode 100644 index 612db3acf2b0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_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_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/2024-05-01/examples/ExpressRouteCrossConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list.py deleted file mode 100644 index 5d843d8595b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_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 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/2024-05-01/examples/ExpressRouteCrossConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_list_by_resource_group.py deleted file mode 100644 index e72387eac88d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_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 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/2024-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.py deleted file mode 100644 index 1dff6c87229d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update.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_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/2024-05-01/examples/ExpressRouteCrossConnectionUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_update_tags.py deleted file mode 100644 index a168f2e5deb3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connection_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 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/2024-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.py deleted file mode 100644 index a72944923644..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_arp_table.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 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/2024-05-01/examples/ExpressRouteCrossConnectionsArpTable.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.py deleted file mode 100644 index f0bd80cc92b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table.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 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/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.py deleted file mode 100644 index 7a9e42e4461d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_cross_connections_route_table_summary.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 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/2024-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.py deleted file mode 100644 index ab918732c440..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_create.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_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/2024-05-01/examples/ExpressRouteGatewayCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_delete.py deleted file mode 100644 index 0d667873e893..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_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_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/2024-05-01/examples/ExpressRouteGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_get.py deleted file mode 100644 index ed1bfffd6aed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_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_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/2024-05-01/examples/ExpressRouteGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_resource_group.py deleted file mode 100644 index c4be65a4d179..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_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 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/2024-05-01/examples/ExpressRouteGatewayListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_list_by_subscription.py deleted file mode 100644 index 9eb6b5cb505e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_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_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/2024-05-01/examples/ExpressRouteGatewayListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_update_tags.py deleted file mode 100644 index f70b92cd887f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_gateway_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 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/2024-05-01/examples/ExpressRouteGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_get.py deleted file mode 100644 index 953b37d86e9d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_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_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/2024-05-01/examples/ExpressRouteLinkGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_link_list.py deleted file mode 100644 index 37e255514125..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_link_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_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/2024-05-01/examples/ExpressRouteLinkList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.py deleted file mode 100644 index 496b48ec07b6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_create.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 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/2024-05-01/examples/ExpressRoutePortAuthorizationCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_delete.py deleted file mode 100644 index 86cc5d448d70..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_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_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/2024-05-01/examples/ExpressRoutePortAuthorizationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_get.py deleted file mode 100644 index 8d22c955c971..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_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_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/2024-05-01/examples/ExpressRoutePortAuthorizationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_list.py deleted file mode 100644 index 4fa6d4450014..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_authorization_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_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/2024-05-01/examples/ExpressRoutePortAuthorizationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_create.py deleted file mode 100644 index 5e4d27d94065..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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_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/2024-05-01/examples/ExpressRoutePortCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_delete.py deleted file mode 100644 index dbd65db5151e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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_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/2024-05-01/examples/ExpressRoutePortDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_get.py deleted file mode 100644 index bd02ec74266a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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_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/2024-05-01/examples/ExpressRoutePortGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list.py deleted file mode 100644 index 46a71228dd34..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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 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/2024-05-01/examples/ExpressRoutePortList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_list_by_resource_group.py deleted file mode 100644 index 5e4b9d1ebc36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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 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/2024-05-01/examples/ExpressRoutePortListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.py deleted file mode 100644 index e0f459d595f0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_link.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_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/2024-05-01/examples/ExpressRoutePortUpdateLink.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_port_update_tags.py deleted file mode 100644 index 9703f8baada7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_port_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 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/2024-05-01/examples/ExpressRoutePortUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_get.py deleted file mode 100644 index 18bb4265eedc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_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_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/2024-05-01/examples/ExpressRoutePortsLocationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_list.py deleted file mode 100644 index 3eff78311b23..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_ports_location_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 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/2024-05-01/examples/ExpressRoutePortsLocationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_list.py deleted file mode 100644 index c6812a937148..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_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 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/2024-05-01/examples/ExpressRouteProviderList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.py deleted file mode 100644 index de5427a0e756..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port.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_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/2024-05-01/examples/expressRouteProviderPort.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py b/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_port_list.py deleted file mode 100644 index c2fa7005a355..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/express_route_provider_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_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/2024-05-01/examples/expressRouteProviderPortList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_delete.py deleted file mode 100644 index b7693a6353a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_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_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/2024-05-01/examples/FirewallPolicyDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_delete.py deleted file mode 100644 index 21674a4836ba..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_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_draft_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_drafts.delete( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.py deleted file mode 100644 index f5eb75bdb6c0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_deploy.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_draft_deploy.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, 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_deployments.begin_deploy( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftDeploy.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_get.py deleted file mode 100644 index 7ab0b574855e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_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_draft_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_drafts.get( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py deleted file mode 100644 index c9e859a92f40..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_draft_put.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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_draft_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_drafts.create_or_update( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - parameters={ - "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", - "profile": "Balanced", - }, - "snat": {"privateRanges": ["IANAPrivateRanges"]}, - "sql": {"allowSqlRedirect": True}, - "threatIntelMode": "Alert", - "threatIntelWhitelist": {"fqdns": ["*.microsoft.com"], "ipAddresses": ["20.3.4.5"]}, - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyDraftPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_get.py deleted file mode 100644 index ce918d13f495..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_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_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/2024-05-01/examples/FirewallPolicyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_resource_group.py deleted file mode 100644 index d845468b07b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_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 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/2024-05-01/examples/FirewallPolicyListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.py deleted file mode 100644 index 0abce81cd7be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_list_by_subscription.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_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/2024-05-01/examples/FirewallPolicyListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_get.py deleted file mode 100644 index 3347943ecd3b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_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 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/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py deleted file mode 100644 index 5efb590fad7e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_nat_rule_collection_group_put.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.py deleted file mode 100644 index ced8ec684f54..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_patch.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 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/2024-05-01/examples/FirewallPolicyPatch.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py deleted file mode 100644 index b24ffc4b37ae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_put.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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", - "profile": "Balanced", - }, - "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/2024-05-01/examples/FirewallPolicyPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.py deleted file mode 100644 index 5a991dfec817..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides.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 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/2024-05-01/examples/FirewallPolicyQuerySignatureOverrides.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.py deleted file mode 100644 index 986413962ccd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_query_signature_overrides_filter_values.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 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/2024-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_delete.py deleted file mode 100644 index 8f69870f8a89..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_delete.py deleted file mode 100644 index 3962c2638ec0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_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 firewall_policy_rule_collection_group_draft_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_group_drafts.delete( - resource_group_name="rg1", - firewall_policy_name="firewallPolicy", - rule_collection_group_name="ruleCollectionGroup1", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_get.py deleted file mode 100644 index 74cc4cac67de..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_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 firewall_policy_rule_collection_group_draft_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_group_drafts.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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_put.py deleted file mode 100644 index 604318c3db42..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_draft_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 firewall_policy_rule_collection_group_draft_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_group_drafts.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"], - } - ], - } - ], - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_get.py deleted file mode 100644 index a1621af392f4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_list.py deleted file mode 100644 index cdc9fe1d5e63..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_put.py deleted file mode 100644 index 3443504e397e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py deleted file mode 100644 index 88bb81e1766a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_http_headers_to_insert.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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 trusted tenants header", - "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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_get.py deleted file mode 100644 index c35c06bf17df..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_list.py deleted file mode 100644 index 9da81f391cb2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py deleted file mode 100644 index 399a1a681ea3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_ip_groups_put.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_get.py deleted file mode 100644 index 098b9209ff62..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_list.py deleted file mode 100644 index 3d1a3171596e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_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 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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_put.py deleted file mode 100644 index 25fcd42fe843..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_rule_collection_group_with_web_categories_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_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/2024-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_get.py deleted file mode 100644 index 309be6ae96a4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_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_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/2024-05-01/examples/FirewallPolicySignatureOverridesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_list.py deleted file mode 100644 index 6ed7c21b3c92..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_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_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/2024-05-01/examples/FirewallPolicySignatureOverridesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.py deleted file mode 100644 index 2719b0ef1360..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_patch.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_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/2024-05-01/examples/FirewallPolicySignatureOverridesPatch.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py b/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_put.py deleted file mode 100644 index d7306288ce8b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/firewall_policy_signature_overrides_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 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/2024-05-01/examples/FirewallPolicySignatureOverridesPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py b/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.py deleted file mode 100644 index 840e8e138bfa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_express_route_ports_loa.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 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/2024-05-01/examples/GenerateExpressRoutePortsLOA.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py b/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.py deleted file mode 100644 index 0f77f4f520a9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/generate_virtual_wan_vpn_server_configuration_vpn_profile.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 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/2024-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.py deleted file mode 100644 index 0abfeedb85b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests.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 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/2024-05-01/examples/GetApplicationGatewayWafDynamicManifests.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py b/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.py deleted file mode 100644 index 6cf6d573725f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_application_gateway_waf_dynamic_manifests_default.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_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/2024-05-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py b/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.py deleted file mode 100644 index 63b45f1b2368..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_inbound_routes.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 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/2024-05-01/examples/GetInboundRoutes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py b/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.py deleted file mode 100644 index 23835a7a301d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_outbound_routes.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 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/2024-05-01/examples/GetOutboundRoutes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py b/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.py deleted file mode 100644 index 8d9739d1887a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/get_virtual_wan_vpn_server_configurations.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 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/2024-05-01/examples/GetVirtualWanVpnServerConfigurations.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_delete.py deleted file mode 100644 index a6dbac15dfdb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_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 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/2024-05-01/examples/HubRouteTableDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_get.py deleted file mode 100644 index 220d8c3aed6a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_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 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/2024-05-01/examples/HubRouteTableGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_list.py deleted file mode 100644 index 3f5083f57491..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_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 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/2024-05-01/examples/HubRouteTableList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py b/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.py deleted file mode 100644 index 1c617e1f1c6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_route_table_put.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 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/2024-05-01/examples/HubRouteTablePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_delete.py deleted file mode 100644 index 117cacf7f1cd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_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 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/2024-05-01/examples/HubVirtualNetworkConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_get.py deleted file mode 100644 index b719f75770ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_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 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/2024-05-01/examples/HubVirtualNetworkConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py deleted file mode 100644 index 90914414d957..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_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 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/2024-05-01/examples/HubVirtualNetworkConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py deleted file mode 100644 index 0d32d74aac1a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_put.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/HubVirtualNetworkConnectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_create.py deleted file mode 100644 index eefea2856473..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_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 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/2024-05-01/examples/InboundNatRuleCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_delete.py deleted file mode 100644 index b7cfaf6e4560..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_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 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/2024-05-01/examples/InboundNatRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_get.py deleted file mode 100644 index 825bd9e41af2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_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 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/2024-05-01/examples/InboundNatRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_list.py deleted file mode 100644 index 9179286cdf0a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_nat_rule_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 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/2024-05-01/examples/InboundNatRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_get.py deleted file mode 100644 index 1ea56ed24f35..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_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 inbound_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.inbound_security_rule.get( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - rule_collection_name="rule1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/inbound_security_rule_put.py deleted file mode 100644 index 178c52e3c202..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/inbound_security_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 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": { - "ruleType": "Permanent", - "rules": [ - { - "appliesOn": ["slbip1"], - "destinationPortRange": 22, - "destinationPortRanges": ["80-100"], - "name": "inboundRule1", - "protocol": "TCP", - "sourceAddressPrefix": "50.20.121.5/32", - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/InboundSecurityRulePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.py deleted file mode 100644 index 231226186f40..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_create.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 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/2024-05-01/examples/IpAllocationCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_delete.py deleted file mode 100644 index 5369dffddb58..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_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 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/2024-05-01/examples/IpAllocationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_get.py deleted file mode 100644 index b7367ed69d2a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_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 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/2024-05-01/examples/IpAllocationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list.py deleted file mode 100644 index 2519067bc658..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_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 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/2024-05-01/examples/IpAllocationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_list_by_resource_group.py deleted file mode 100644 index 0f6c9227ce1e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_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 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/2024-05-01/examples/IpAllocationListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_update_tags.py deleted file mode 100644 index 934d33afa377..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_allocation_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 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/2024-05-01/examples/IpAllocationUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.py deleted file mode 100644 index d1d41ea3550f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_create.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 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/2024-05-01/examples/IpGroupsCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_delete.py deleted file mode 100644 index 3054993d9f81..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_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 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/2024-05-01/examples/IpGroupsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_get.py deleted file mode 100644 index eb0f488d7548..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/IpGroupsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_resource_group.py deleted file mode 100644 index 405668aacdda..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_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 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/2024-05-01/examples/IpGroupsListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.py deleted file mode 100644 index 08b995b421cd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_list_by_subscription.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_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/2024-05-01/examples/IpGroupsListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/ip_groups_update_tags.py deleted file mode 100644 index d73c0fd93dab..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ip_groups_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 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/2024-05-01/examples/IpGroupsUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_create.py deleted file mode 100644 index 0d0906199f65..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_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 ipam_pools_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.begin_create( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - body={ - "location": "eastus", - "properties": { - "addressPrefixes": ["10.0.0.0/24"], - "description": "Test description.", - "parentPoolName": "", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Create.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_delete.py deleted file mode 100644 index d11dde2b62ac..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_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 ipam_pools_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - client.ipam_pools.begin_delete( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get.py deleted file mode 100644 index 5e6a3f87055e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_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 ipam_pools_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.get( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.py deleted file mode 100644 index dc8a8ddcdc66..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_get_pool_usage.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 ipam_pools_get_pool_usage.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.get_pool_usage( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_GetPoolUsage.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list.py deleted file mode 100644 index d415c0ed41a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_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 ipam_pools_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.list( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_List.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.py deleted file mode 100644 index 865bc5c3d169..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_list_associated_resources.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 ipam_pools_list_associated_resources.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.list_associated_resources( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_ListAssociatedResources.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py b/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.py deleted file mode 100644 index 25515d9e04e2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/ipam_pools_update.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 ipam_pools_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.ipam_pools.update( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/IpamPools_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.py deleted file mode 100644 index 401e2ea28ee2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_list_with_backend_addresses_pool_type.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 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/2024-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_get.py deleted file mode 100644 index e3db6b65d301..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_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 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/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py b/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.py deleted file mode 100644 index cc3f25c31cdc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/lb_backend_address_pool_with_backend_addresses_put.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 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/2024-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_delete.py deleted file mode 100644 index 2693beded82b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_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 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/2024-05-01/examples/LoadBalancerBackendAddressPoolDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_get.py deleted file mode 100644 index 11a83e20ea7d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_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 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/2024-05-01/examples/LoadBalancerBackendAddressPoolGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_list.py deleted file mode 100644 index 121829a535fd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_backend_address_pool_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 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/2024-05-01/examples/LoadBalancerBackendAddressPoolList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.py deleted file mode 100644 index 6efb63e68f84..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create.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.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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/2024-05-01/examples/LoadBalancerCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py deleted file mode 100644 index 52d5c57d8b5e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_consumer.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.py deleted file mode 100644 index 343da6949907..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_one_backend_pool.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 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": "Gateway"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py deleted file mode 100644 index 647b34aa77ef..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_gateway_load_balancer_provider_with_two_backend_pool.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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": "Gateway"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.py deleted file mode 100644 index bd549bbb40d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_global_tier.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_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/2024-05-01/examples/LoadBalancerCreateGlobalTier.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.py deleted file mode 100644 index 1799139d8227..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_standard_sku.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_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/2024-05-01/examples/LoadBalancerCreateStandardSku.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.py deleted file mode 100644 index 90909533cabd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_inbound_nat_pool.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 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/2024-05-01/examples/LoadBalancerCreateWithInboundNatPool.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py deleted file mode 100644 index 2afa7923e16e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_outbound_rules.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/LoadBalancerCreateWithOutboundRules.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py deleted file mode 100644 index e7a985be9a6d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_sync_mode_property_on_pool.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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_sync_mode_property_on_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": { - "syncMode": "Automatic", - "virtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb" - }, - }, - } - ], - "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/2024-05-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py deleted file mode 100644 index d87a3bd46aa6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_create_with_zones.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/LoadBalancerCreateWithZones.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_delete.py deleted file mode 100644 index 5ed2d58ff826..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_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_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/2024-05-01/examples/LoadBalancerDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_get.py deleted file mode 100644 index 878ca845ca4c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_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 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/2024-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_list.py deleted file mode 100644 index 2baa1ae79f58..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_frontend_ip_configuration_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 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/2024-05-01/examples/LoadBalancerFrontendIPConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get.py deleted file mode 100644 index bef07c6a02d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_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_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/2024-05-01/examples/LoadBalancerGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.py deleted file mode 100644 index fed887bd347b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_get_inbound_nat_rule_port_mapping.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_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/2024-05-01/examples/LoadBalancerGetInboundNatRulePortMapping.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.py deleted file mode 100644 index 66293d09cd03..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_health.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 load_balancer_health.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.load_balancer_load_balancing_rules.begin_health( - group_name="rg1", - load_balancer_name="lb1", - load_balancing_rule_name="rulelb", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/LoadBalancerHealth.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list.py deleted file mode 100644 index 424e4d72641b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/LoadBalancerList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.py deleted file mode 100644 index 1175ca44babe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_list_all.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_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/2024-05-01/examples/LoadBalancerListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_get.py deleted file mode 100644 index 9a92623c38be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_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 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/2024-05-01/examples/LoadBalancerLoadBalancingRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_list.py deleted file mode 100644 index 89ea9b6b9d69..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_load_balancing_rule_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 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/2024-05-01/examples/LoadBalancerLoadBalancingRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.py deleted file mode 100644 index 1c453c28ac2d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_simple.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 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/2024-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.py deleted file mode 100644 index ca52b463838c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_network_interface_list_vmss.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 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/2024-05-01/examples/LoadBalancerNetworkInterfaceListVmss.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_get.py deleted file mode 100644 index ce6f0c05bc5c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_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 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/2024-05-01/examples/LoadBalancerOutboundRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_list.py deleted file mode 100644 index 97bafd85c0e9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_outbound_rule_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 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/2024-05-01/examples/LoadBalancerOutboundRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_get.py deleted file mode 100644 index eff36f5f3ead..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_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 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/2024-05-01/examples/LoadBalancerProbeGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_list.py deleted file mode 100644 index 08393f66ebb5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_probe_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 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/2024-05-01/examples/LoadBalancerProbeList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancer_update_tags.py deleted file mode 100644 index 4ec41e2c481d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancer_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 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/2024-05-01/examples/LoadBalancerUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py b/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.py deleted file mode 100644 index 87ff75dc5852..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/load_balancers_swap_public_ip_addresses.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 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/2024-05-01/examples/LoadBalancersSwapPublicIpAddresses.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_create.py deleted file mode 100644 index 22e1e3cb173b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_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 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/2024-05-01/examples/LocalNetworkGatewayCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_delete.py deleted file mode 100644 index 3743748b9ee2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_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 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/2024-05-01/examples/LocalNetworkGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_get.py deleted file mode 100644 index 7c499088dcdf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_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 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/2024-05-01/examples/LocalNetworkGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_list.py deleted file mode 100644 index 7fc613a8126a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_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 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/2024-05-01/examples/LocalNetworkGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_update_tags.py deleted file mode 100644 index 3870be29f451..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/local_network_gateway_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 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/2024-05-01/examples/LocalNetworkGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py b/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.py deleted file mode 100644 index 6da500267519..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/migrate_load_balancer_to_ip_based.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 migrate_load_balancer_to_ip_based.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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.migrate_to_ip_based( - group_name="rg1", - load_balancer_name="lb1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/MigrateLoadBalancerToIPBased.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.py deleted file mode 100644 index 450a1b68cde6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_create_or_update.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 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/2024-05-01/examples/NatGatewayCreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_delete.py deleted file mode 100644 index 38d89f9fd124..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_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_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/2024-05-01/examples/NatGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_get.py deleted file mode 100644 index 92cdf547d2e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_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_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/2024-05-01/examples/NatGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list.py deleted file mode 100644 index ec5e7d511843..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_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_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/2024-05-01/examples/NatGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.py deleted file mode 100644 index 15b3a1adfe05..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_list_all.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_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/2024-05-01/examples/NatGatewayListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_update_tags.py deleted file mode 100644 index e4c7e5986d1d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_gateway_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 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/2024-05-01/examples/NatGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_delete.py deleted file mode 100644 index 5318ee04b631..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_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 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/2024-05-01/examples/NatRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_get.py deleted file mode 100644 index d82f79ed8aaa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_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 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/2024-05-01/examples/NatRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/nat_rule_list.py deleted file mode 100644 index c5e2074a01a9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/nat_rule_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 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/2024-05-01/examples/NatRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.py deleted file mode 100644 index 65a47f862837..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create.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.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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" - }, - }, - }, - {"name": "ipconfig2", "properties": {"privateIPAddressPrefixLength": 28}}, - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.py deleted file mode 100644 index a49561731cd3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_create_gateway_load_balancer_consumer.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_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/2024-05-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_delete.py deleted file mode 100644 index b9aad3c9c1b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_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_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/2024-05-01/examples/NetworkInterfaceDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_list.py deleted file mode 100644 index e52a9b74189d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_nsg_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_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/2024-05-01/examples/NetworkInterfaceEffectiveNSGList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_route_table_list.py deleted file mode 100644 index 17251fb4b405..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_effective_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 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/2024-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_get.py deleted file mode 100644 index e420d7d75378..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_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_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/2024-05-01/examples/NetworkInterfaceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_get.py deleted file mode 100644 index df6a5e125501..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_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_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/2024-05-01/examples/NetworkInterfaceIPConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_list.py deleted file mode 100644 index f2f8da4cb83b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_ip_configuration_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_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/2024-05-01/examples/NetworkInterfaceIPConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list.py deleted file mode 100644 index c4b01f6a1000..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/NetworkInterfaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.py deleted file mode 100644 index 94514de14cb4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_list_all.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_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/2024-05-01/examples/NetworkInterfaceListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_list.py deleted file mode 100644 index 4e98a0f83e4c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_load_balancer_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_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/2024-05-01/examples/NetworkInterfaceLoadBalancerList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_create.py deleted file mode 100644 index 349c39e7b673..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_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 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/2024-05-01/examples/NetworkInterfaceTapConfigurationCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_delete.py deleted file mode 100644 index 339175611956..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_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_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="testrg", - network_interface_name="mynic", - tap_configuration_name="tapconfiguration1", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_get.py deleted file mode 100644 index 315dd4eeab19..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_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_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/2024-05-01/examples/NetworkInterfaceTapConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_list.py deleted file mode 100644 index 2ba72cef8a2c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_tap_configuration_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_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="testrg", - network_interface_name="mynic", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkInterfaceTapConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_interface_update_tags.py deleted file mode 100644 index 89d97ed50a0f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_interface_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_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/2024-05-01/examples/NetworkInterfaceUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_list.py deleted file mode 100644 index 6ea8239b0372..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_connectivity_configurations_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_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/2024-05-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_list.py deleted file mode 100644 index 7c9eb928e272..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_active_security_admin_rules_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_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/2024-05-01/examples/NetworkManagerActiveSecurityAdminRulesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_delete.py deleted file mode 100644 index ab37a76fb053..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_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_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/2024-05-01/examples/NetworkManagerAdminRuleCollectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_get.py deleted file mode 100644 index 227c50460be6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_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_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/2024-05-01/examples/NetworkManagerAdminRuleCollectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_list.py deleted file mode 100644 index 270f4293dd25..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_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_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/2024-05-01/examples/NetworkManagerAdminRuleCollectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.py deleted file mode 100644 index 8f9b57ae3503..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_collection_put.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_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/2024-05-01/examples/NetworkManagerAdminRuleCollectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.py deleted file mode 100644 index 8715dffd98a6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_delete.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_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/2024-05-01/examples/NetworkManagerAdminRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_get.py deleted file mode 100644 index e7151b6f94bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_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 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/2024-05-01/examples/NetworkManagerAdminRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_list.py deleted file mode 100644 index 848ef52ba16b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_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 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/2024-05-01/examples/NetworkManagerAdminRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.py deleted file mode 100644 index f792f7ff2234..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put.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 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/2024-05-01/examples/NetworkManagerAdminRulePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.py deleted file mode 100644 index 5740a8b6bf23..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_admin_rule_put_network_group_source.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_admin_rule_put_network_group_source.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.admin_rules.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleAdminRule", - admin_rule={ - "kind": "Custom", - "properties": { - "access": "Deny", - "description": "This is Sample Admin Rule", - "destinationPortRanges": ["22"], - "destinations": [ - { - "addressPrefix": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1", - "addressPrefixType": "NetworkGroup", - } - ], - "direction": "Inbound", - "priority": 1, - "protocol": "Tcp", - "sourcePortRanges": ["0-65535"], - "sources": [{"addressPrefix": "Internet", "addressPrefixType": "ServiceTag"}], - }, - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.py deleted file mode 100644 index abad8868f2b2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_commit_post.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_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/2024-05-01/examples/NetworkManagerCommitPost.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_delete.py deleted file mode 100644 index 8c4fb5c818f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_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_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/2024-05-01/examples/NetworkManagerConnectionManagementGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_get.py deleted file mode 100644 index 72430b09f5b8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_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_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/2024-05-01/examples/NetworkManagerConnectionManagementGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_list.py deleted file mode 100644 index 0e806d609485..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_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_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/2024-05-01/examples/NetworkManagerConnectionManagementGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_put.py deleted file mode 100644 index ea38e894f6fa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_management_group_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 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/2024-05-01/examples/NetworkManagerConnectionManagementGroupPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_delete.py deleted file mode 100644 index 5a59a46dd69f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_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_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/2024-05-01/examples/NetworkManagerConnectionSubscriptionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_get.py deleted file mode 100644 index 15ab22e78f09..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_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 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/2024-05-01/examples/NetworkManagerConnectionSubscriptionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_list.py deleted file mode 100644 index f6d79fc92098..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_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 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/2024-05-01/examples/NetworkManagerConnectionSubscriptionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_put.py deleted file mode 100644 index 85f2663e2671..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connection_subscription_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_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/2024-05-01/examples/NetworkManagerConnectionSubscriptionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_delete.py deleted file mode 100644 index 32ec60e1179a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_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_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/2024-05-01/examples/NetworkManagerConnectivityConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_get.py deleted file mode 100644 index 6396ac9dab4f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_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_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/2024-05-01/examples/NetworkManagerConnectivityConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_list.py deleted file mode 100644 index 74d21193babf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_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_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/2024-05-01/examples/NetworkManagerConnectivityConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_put.py deleted file mode 100644 index 5aa6b4820a37..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_connectivity_configuration_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_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/2024-05-01/examples/NetworkManagerConnectivityConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_get.py deleted file mode 100644 index 48ce8ce49e71..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_default_admin_rule_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 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/2024-05-01/examples/NetworkManagerDefaultAdminRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_delete.py deleted file mode 100644 index 76196434c9bd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_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_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/2024-05-01/examples/NetworkManagerDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.py deleted file mode 100644 index e7889b4f829a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_deployment_status_list.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_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/2024-05-01/examples/NetworkManagerDeploymentStatusList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_list.py deleted file mode 100644 index dba990b282ad..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_connectivity_configurations_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_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/2024-05-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_list.py deleted file mode 100644 index c0268f99a7be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_effective_security_admin_rules_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_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/2024-05-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_get.py deleted file mode 100644 index 115a8704d5ce..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_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_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/2024-05-01/examples/NetworkManagerGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_delete.py deleted file mode 100644 index 351463facfb9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_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_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/2024-05-01/examples/NetworkManagerGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_get.py deleted file mode 100644 index 74a6a74e645f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_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_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/2024-05-01/examples/NetworkManagerGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_list.py deleted file mode 100644 index b2101fa09160..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_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_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/2024-05-01/examples/NetworkManagerGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.py deleted file mode 100644 index 51ffd9757645..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_group_put.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_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", "memberType": "VirtualNetwork"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerGroupPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list.py deleted file mode 100644 index 81937c75769c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_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_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/2024-05-01/examples/NetworkManagerList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.py deleted file mode 100644 index 9c4140af9114..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_list_all.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_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/2024-05-01/examples/NetworkManagerListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.py deleted file mode 100644 index 0c81371858dd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_patch.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_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/2024-05-01/examples/NetworkManagerPatch.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_put.py deleted file mode 100644 index 006013d7dc02..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_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 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/2024-05-01/examples/NetworkManagerPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_delete.py deleted file mode 100644 index 2ae8c53bffec..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_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_routing_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.network_manager_routing_configurations.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_get.py deleted file mode 100644 index 358ec0683e32..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_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_routing_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.network_manager_routing_configurations.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_list.py deleted file mode 100644 index 9d3ff7145db5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_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_routing_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.network_manager_routing_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/2024-05-01/examples/NetworkManagerRoutingConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.py deleted file mode 100644 index a828d14ac21e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_configuration_put.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_routing_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.network_manager_routing_configurations.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - routing_configuration={"properties": {"description": "A sample policy"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_delete.py deleted file mode 100644 index 174106104b98..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_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_routing_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.routing_rule_collections.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_get.py deleted file mode 100644 index 9f1f0773cfbc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_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_routing_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.routing_rule_collections.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_list.py deleted file mode 100644 index 5bf15687bb6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_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_routing_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.routing_rule_collections.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleCollectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.py deleted file mode 100644 index b1451650b4bf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_collection_put.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_manager_routing_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.routing_rule_collections.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - rule_collection={ - "properties": { - "appliesTo": [ - { - "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/2024-05-01/examples/NetworkManagerRoutingRuleCollectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.py deleted file mode 100644 index aded83d6e295..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_delete.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_routing_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.routing_rules.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - rule_name="sampleRule", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_get.py deleted file mode 100644 index 9f0d8e9ac716..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_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 network_manager_routing_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.routing_rules.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleRoutingRule", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_list.py deleted file mode 100644 index 6ef259ce212c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_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 network_manager_routing_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.routing_rules.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_put.py deleted file mode 100644 index dbafdb3aa9d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_routing_rule_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 network_manager_routing_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.routing_rules.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestRoutingConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleRoutingRule", - routing_rule={ - "properties": { - "description": "This is Sample Routing Rule", - "destination": {"destinationAddress": "10.0.0.0/16", "type": "AddressPrefix"}, - "nextHop": {"nextHopType": "VirtualNetworkGateway"}, - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerRoutingRulePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_delete.py deleted file mode 100644 index efc425f0b17b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_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 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/2024-05-01/examples/NetworkManagerScopeConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_get.py deleted file mode 100644 index 88148471fd61..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_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 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/2024-05-01/examples/NetworkManagerScopeConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_list.py deleted file mode 100644 index c387479011dd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_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 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/2024-05-01/examples/NetworkManagerScopeConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_put.py deleted file mode 100644 index 0b7a56f8d1f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_scope_connection_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 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/2024-05-01/examples/NetworkManagerScopeConnectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_delete.py deleted file mode 100644 index 9d784a185e2f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_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_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/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_get.py deleted file mode 100644 index 0e57e764bbcc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_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_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/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_list.py deleted file mode 100644 index 1b8e9b1bb5b2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_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_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/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put.py deleted file mode 100644 index e416d75baf64..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_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_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/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.py deleted file mode 100644 index 4a2cd7bdbfc2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_admin_configuration_put_manual_aggregation.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_security_admin_configuration_put_manual_aggregation.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.security_admin_configurations.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - security_admin_configuration={ - "properties": { - "description": "A configuration which will update any network groups ip addresses at commit times.", - "networkGroupAddressSpaceAggregationOption": "Manual", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_delete.py deleted file mode 100644 index 06b034d4b9be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_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_security_user_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_user_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/2024-05-01/examples/NetworkManagerSecurityUserConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_get.py deleted file mode 100644 index 823cca86fe31..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_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_security_user_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_user_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/2024-05-01/examples/NetworkManagerSecurityUserConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_list.py deleted file mode 100644 index 5f6c55c2e552..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_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_security_user_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_user_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/2024-05-01/examples/NetworkManagerSecurityUserConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.py deleted file mode 100644 index efdfd0c910ab..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_configuration_put.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_security_user_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_user_configurations.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - security_user_configuration={"properties": {"description": "A sample policy"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_delete.py deleted file mode 100644 index edc942b4ba72..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_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_security_user_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.security_user_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/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_get.py deleted file mode 100644 index 745bde16de39..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_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_security_user_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.security_user_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/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_list.py deleted file mode 100644 index 503ea7f311d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_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_security_user_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.security_user_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/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.py deleted file mode 100644 index 1983cd610cce..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_collection_put.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_manager_security_user_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.security_user_rule_collections.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - security_user_rule_collection={ - "properties": { - "appliesToGroups": [ - { - "networkGroupId": "/subscriptions/subId/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/2024-05-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.py deleted file mode 100644 index e187f9b2e7e3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_delete.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_security_user_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.security_user_rules.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleUserRule", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_get.py deleted file mode 100644 index 8feb8c50af45..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_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 network_manager_security_user_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.security_user_rules.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleUserRule", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_list.py deleted file mode 100644 index e87608d7cee9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_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 network_manager_security_user_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.security_user_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/2024-05-01/examples/NetworkManagerSecurityUserRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_put.py deleted file mode 100644 index e623579e94ae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_security_user_rule_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 network_manager_security_user_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.security_user_rules.create_or_update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - configuration_name="myTestSecurityConfig", - rule_collection_name="testRuleCollection", - rule_name="SampleUserRule", - security_user_rule={ - "properties": { - "description": "Sample User Rule", - "destinationPortRanges": ["22"], - "destinations": [{"addressPrefix": "*", "addressPrefixType": "IPPrefix"}], - "direction": "Inbound", - "protocol": "Tcp", - "sourcePortRanges": ["0-65535"], - "sources": [{"addressPrefix": "*", "addressPrefixType": "IPPrefix"}], - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkManagerSecurityUserRulePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_delete.py deleted file mode 100644 index eef067639166..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_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_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/2024-05-01/examples/NetworkManagerStaticMemberDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_get.py deleted file mode 100644 index 7b623dcf287e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_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_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/2024-05-01/examples/NetworkManagerStaticMemberGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_list.py deleted file mode 100644 index b90c4142627b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_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_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/2024-05-01/examples/NetworkManagerStaticMemberList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_put.py deleted file mode 100644 index d9091bf11ee3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_manager_static_member_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_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/2024-05-01/examples/NetworkManagerStaticMemberPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.py deleted file mode 100644 index 0fc080b4a078..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_create_config_only.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_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/2024-05-01/examples/NetworkProfileCreateConfigOnly.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_delete.py deleted file mode 100644 index f9b0f0931d6d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_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_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/2024-05-01/examples/NetworkProfileDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.py deleted file mode 100644 index 9df467f3a753..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_config_only.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_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/2024-05-01/examples/NetworkProfileGetConfigOnly.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.py deleted file mode 100644 index e898c9babfed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_get_with_container_nic.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_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/2024-05-01/examples/NetworkProfileGetWithContainerNic.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list.py deleted file mode 100644 index 73ee531fb4b7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_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_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/2024-05-01/examples/NetworkProfileList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.py deleted file mode 100644 index 0bbb569aa03d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_list_all.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_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/2024-05-01/examples/NetworkProfileListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_profile_update_tags.py deleted file mode 100644 index 8b3f9e145330..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_profile_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_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/2024-05-01/examples/NetworkProfileUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create.py deleted file mode 100644 index d8bcf05a0b11..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_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 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/2024-05-01/examples/NetworkSecurityGroupCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.py deleted file mode 100644 index 97c7db4ead0a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_create_with_rule.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 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/2024-05-01/examples/NetworkSecurityGroupCreateWithRule.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_delete.py deleted file mode 100644 index b2aeba9ccb4a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_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_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/2024-05-01/examples/NetworkSecurityGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_get.py deleted file mode 100644 index 48576e5a7bc2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_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_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/2024-05-01/examples/NetworkSecurityGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list.py deleted file mode 100644 index 910a330f178d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_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_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/2024-05-01/examples/NetworkSecurityGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.py deleted file mode 100644 index 835ef90fe56a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_list_all.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_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/2024-05-01/examples/NetworkSecurityGroupListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_create.py deleted file mode 100644 index 9c4478635521..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_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 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/2024-05-01/examples/NetworkSecurityGroupRuleCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_delete.py deleted file mode 100644 index d2a11f829535..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_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_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/2024-05-01/examples/NetworkSecurityGroupRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_get.py deleted file mode 100644 index d27735c02e78..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_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_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/2024-05-01/examples/NetworkSecurityGroupRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_list.py deleted file mode 100644 index 18f036a73aff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_rule_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_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/2024-05-01/examples/NetworkSecurityGroupRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_security_group_update_tags.py deleted file mode 100644 index 46418ee7a6be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_security_group_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_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/2024-05-01/examples/NetworkSecurityGroupUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_delete.py deleted file mode 100644 index 9e3d90a8044d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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 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/2024-05-01/examples/NetworkVirtualApplianceConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_get.py deleted file mode 100644 index 2b4a8e0bb1fc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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 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/2024-05-01/examples/NetworkVirtualApplianceConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_connection_list.py deleted file mode 100644 index 7f53c78190e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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 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/2024-05-01/examples/NetworkVirtualApplianceConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_delete.py deleted file mode 100644 index 25c0577d5338..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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_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/2024-05-01/examples/NetworkVirtualApplianceDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.py deleted file mode 100644 index 9db495d3f7c4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_empty_restart.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_empty_restart.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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_restart( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceEmptyRestart.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_get.py deleted file mode 100644 index 44020160e822..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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_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/2024-05-01/examples/NetworkVirtualApplianceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_resource_group.py deleted file mode 100644 index a3428776d0c5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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 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/2024-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.py deleted file mode 100644 index 1296c5dbf706..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_list_by_subscription.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_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/2024-05-01/examples/NetworkVirtualApplianceListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py deleted file mode 100644 index f1f24b2af230..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_put.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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" - ], - "internetIngressPublicIps": [ - { - "id": "/subscriptions/{{subscriptionId}}/resourceGroups/{{rg}}/providers/Microsoft.Network/publicIPAddresses/slbip" - } - ], - "networkProfile": { - "networkInterfaceConfigurations": [ - { - "properties": { - "ipConfigurations": [ - {"name": "publicnicipconfig", "properties": {"primary": True}}, - {"name": "publicnicipconfig-2", "properties": {"primary": False}}, - ] - }, - "type": "PublicNic", - }, - { - "properties": { - "ipConfigurations": [ - {"name": "privatenicipconfig", "properties": {"primary": True}}, - {"name": "privatenicipconfig-2", "properties": {"primary": False}}, - ] - }, - "type": "PrivateNic", - }, - ] - }, - "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/2024-05-01/examples/NetworkVirtualAppliancePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.py deleted file mode 100644 index 30af763e79fa..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_saa_sput.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 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/2024-05-01/examples/NetworkVirtualApplianceSaaSPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_delete.py deleted file mode 100644 index fbfd829a4582..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_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_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/2024-05-01/examples/NetworkVirtualApplianceSiteDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_get.py deleted file mode 100644 index 4f551649b230..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_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_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/2024-05-01/examples/NetworkVirtualApplianceSiteGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_list.py deleted file mode 100644 index b9137767abf7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_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_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/2024-05-01/examples/NetworkVirtualApplianceSiteList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_put.py deleted file mode 100644 index 9cc9c309c339..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_site_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_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/2024-05-01/examples/NetworkVirtualApplianceSitePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_get.py deleted file mode 100644 index aa8c943f765c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_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_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/2024-05-01/examples/NetworkVirtualApplianceSkuGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_list.py deleted file mode 100644 index dad53445962c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_sku_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 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/2024-05-01/examples/NetworkVirtualApplianceSkuList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.py deleted file mode 100644 index 6dd9f5ab8614..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_specific_restart.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_specific_restart.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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_restart( - resource_group_name="rg1", - network_virtual_appliance_name="nva", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkVirtualApplianceSpecificRestart.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_update_tags.py deleted file mode 100644 index 6257d9444e84..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_virtual_appliance_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_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/2024-05-01/examples/NetworkVirtualApplianceUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_get.py deleted file mode 100644 index f74b1ceee52e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_available_providers_list_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_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/2024-05-01/examples/NetworkWatcherAvailableProvidersListGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.py deleted file mode 100644 index d49fef4f34ac..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_azure_reachability_report_get.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_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/2024-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.py deleted file mode 100644 index 3ccfd97b99ae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create.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 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/2024-05-01/examples/NetworkWatcherConnectionMonitorCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py deleted file mode 100644 index 8ef3e8e8ad4e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_create_with_arc_network.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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_with_arc_network.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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/9cece3e3-0f7d-47ca-af0e-9772773f90b7/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/TESTVM", - "type": "AzureVM", - }, - {"address": "bing.com", "name": "bing", "type": "ExternalAddress"}, - {"address": "google.com", "name": "google", "type": "ExternalAddress"}, - { - "locationDetails": {"region": "eastus"}, - "name": "ArcBasedNetwork", - "scope": {"include": [{"address": "172.21.128.0/20"}]}, - "subscriptionId": "9cece3e3-0f7d-47ca-af0e-9772773f90b7", - "type": "AzureArcNetwork", - }, - ], - "outputs": [], - "testConfigurations": [ - { - "name": "testConfig1", - "protocol": "Tcp", - "tcpConfiguration": {"disableTraceRoute": False, "port": 80}, - "testFrequencySec": 60, - } - ], - "testGroups": [ - { - "destinations": ["bing", "google"], - "disable": False, - "name": "test1", - "sources": ["vm1", "ArcBasedNetwork"], - "testConfigurations": ["testConfig1"], - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_delete.py deleted file mode 100644 index 7249560b2b92..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_get.py deleted file mode 100644 index 9beb20903463..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_list.py deleted file mode 100644 index 324eadcae4b1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.py deleted file mode 100644 index 5fed5ef94edd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_query.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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorQuery.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.py deleted file mode 100644 index 366bbaba8d42..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_start.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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorStart.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.py deleted file mode 100644 index 528096f7fbcc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_stop.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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorStop.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.py deleted file mode 100644 index 9e243bdbe523..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_update_tags.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_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/2024-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_create.py deleted file mode 100644 index 947d1e2f85d9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connection_monitor_v2_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 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/2024-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.py deleted file mode 100644 index 6caaaca33d61..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_connectivity_check.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_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/2024-05-01/examples/NetworkWatcherConnectivityCheck.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_create.py deleted file mode 100644 index f8762e5c905a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_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 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/2024-05-01/examples/NetworkWatcherCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_delete.py deleted file mode 100644 index 5d0cfefd6d5e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_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_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/2024-05-01/examples/NetworkWatcherDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.py deleted file mode 100644 index c4960cc7b5ac..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_configure.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 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={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} - }, - }, - "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/2024-05-01/examples/NetworkWatcherFlowLogConfigure.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.py deleted file mode 100644 index c1ddc0b19055..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_create.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 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={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} - }, - }, - "location": "centraluseuap", - "properties": { - "enabled": True, - "enabledFilteringCriteria": "srcIP=158.255.7.8 || dstPort=56891", - "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/2024-05-01/examples/NetworkWatcherFlowLogCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_delete.py deleted file mode 100644 index 4f986b8b1ac1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_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_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/2024-05-01/examples/NetworkWatcherFlowLogDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_get.py deleted file mode 100644 index b8ee4bee64be..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_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_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/2024-05-01/examples/NetworkWatcherFlowLogGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_list.py deleted file mode 100644 index f1bca7ca0016..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_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_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/2024-05-01/examples/NetworkWatcherFlowLogList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.py deleted file mode 100644 index 7faa6dbff206..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_status_query.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_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/2024-05-01/examples/NetworkWatcherFlowLogStatusQuery.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.py deleted file mode 100644 index 87c0a35d1c98..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_flow_log_update_tags.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_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/2024-05-01/examples/NetworkWatcherFlowLogUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_get.py deleted file mode 100644 index 38d7a92181a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_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_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/2024-05-01/examples/NetworkWatcherGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.py deleted file mode 100644 index a77dc406f6bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_ip_flow_verify.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_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/2024-05-01/examples/NetworkWatcherIpFlowVerify.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list.py deleted file mode 100644 index 5fb617e35678..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_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_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/2024-05-01/examples/NetworkWatcherList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.py deleted file mode 100644 index 72985c07c821..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_list_all.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_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/2024-05-01/examples/NetworkWatcherListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.py deleted file mode 100644 index 7b691d0cca9f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_network_configuration_diagnostic.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_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/2024-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_get.py deleted file mode 100644 index 056286261a59..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_next_hop_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_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/2024-05-01/examples/NetworkWatcherNextHopGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_create.py deleted file mode 100644 index fc3ef1a48c25..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_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 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/2024-05-01/examples/NetworkWatcherPacketCaptureCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_delete.py deleted file mode 100644 index cc88c8e5e62b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_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_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/2024-05-01/examples/NetworkWatcherPacketCaptureDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_get.py deleted file mode 100644 index 3c9629c2dee3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_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_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/2024-05-01/examples/NetworkWatcherPacketCaptureGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.py deleted file mode 100644 index e8efb4b9ec57..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_query_status.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_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/2024-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.py deleted file mode 100644 index 1ff2558025d2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_capture_stop.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_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/2024-05-01/examples/NetworkWatcherPacketCaptureStop.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_list.py deleted file mode 100644 index cb43694e212e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_packet_captures_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_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/2024-05-01/examples/NetworkWatcherPacketCapturesList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_get.py deleted file mode 100644 index b9bf6f946d5e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_security_group_view_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 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/2024-05-01/examples/NetworkWatcherSecurityGroupViewGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_get.py deleted file mode 100644 index 374b9c7f420f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_topology_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_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/2024-05-01/examples/NetworkWatcherTopologyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.py deleted file mode 100644 index 6f109c7a0bc5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_get.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_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/2024-05-01/examples/NetworkWatcherTroubleshootGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.py deleted file mode 100644 index a72609787980..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_troubleshoot_result_query.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_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/2024-05-01/examples/NetworkWatcherTroubleshootResultQuery.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/network_watcher_update_tags.py deleted file mode 100644 index 4d3927299166..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/network_watcher_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_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/2024-05-01/examples/NetworkWatcherUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/operation_list.py b/sdk/network/azure-mgmt-network/generated_samples/operation_list.py deleted file mode 100644 index 7bba7c1fbe17..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/operation_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 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/2024-05-01/examples/OperationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_delete.py deleted file mode 100644 index a32e9fd3b870..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 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/2024-05-01/examples/P2SVpnGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.py deleted file mode 100644 index fe508812af5e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_generate_vpn_profile.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 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/2024-05-01/examples/P2SVpnGatewayGenerateVpnProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get.py deleted file mode 100644 index 65ba6a526c6c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 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/2024-05-01/examples/P2SVpnGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.py deleted file mode 100644 index cb5144bcd486..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health.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_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/2024-05-01/examples/P2SVpnGatewayGetConnectionHealth.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.py deleted file mode 100644 index 257f3642359e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_get_connection_health_detailed.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 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/2024-05-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list.py deleted file mode 100644 index 1e521ec4bbae..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 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/2024-05-01/examples/P2SVpnGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_list_by_resource_group.py deleted file mode 100644 index a5af724bb181..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 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/2024-05-01/examples/P2SVpnGatewayListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py deleted file mode 100644 index 5bfb4a8faa9a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_put.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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_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.p2_svpn_gateways.begin_create_or_update( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - p2_s_vpn_gateway_parameters={ - "location": "West US", - "properties": { - "customDnsServers": ["1.1.1.1", "2.2.2.2"], - "isRoutingPreferenceInternet": False, - "p2SConnectionConfigurations": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1", - "name": "P2SConnectionConfig1", - "properties": { - "routingConfiguration": { - "associatedRouteTable": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - }, - "propagatedRouteTables": { - "ids": [ - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1" - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2" - }, - { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3" - }, - ], - "labels": ["label1", "label2"], - }, - "vnetRoutes": {"staticRoutes": []}, - }, - "vpnClientAddressPool": {"addressPrefixes": ["101.3.0.0/16"]}, - }, - } - ], - "virtualHub": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1" - }, - "vpnGatewayScaleUnit": 1, - "vpnServerConfiguration": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1" - }, - }, - "tags": {"key1": "value1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_reset.py deleted file mode 100644 index 1a12161ed307..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 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/2024-05-01/examples/P2SVpnGatewayReset.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_update_tags.py deleted file mode 100644 index 37b041c3aaca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2_svpn_gateway_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 p2_svpn_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.p2_svpn_gateways.begin_update_tags( - resource_group_name="rg1", - gateway_name="p2sVpnGateway1", - p2_s_vpn_gateway_parameters={"tags": {"tag1": "value1", "tag2": "value2"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2SVpnGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py b/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_connections.py deleted file mode 100644 index ab84ce61f31a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/p2s_vpn_gateways_disconnect_p2s_vpn_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 p2s_vpn_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.p2_svpn_gateways.begin_disconnect_p2_s_vpn_connections( - resource_group_name="p2s-vpn-gateway-test", - p2_s_vpn_gateway_name="p2svpngateway", - request={"vpnConnectionIds": ["vpnconnId1", "vpnconnId2"]}, - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_get.py deleted file mode 100644 index 41228fee8f01..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_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 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/2024-05-01/examples/PeerExpressRouteCircuitConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_list.py deleted file mode 100644 index 2df84e262ef8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/peer_express_route_circuit_connection_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 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/2024-05-01/examples/PeerExpressRouteCircuitConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.py deleted file mode 100644 index 8d1179879956..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create.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 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/2024-05-01/examples/PrivateEndpointCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.py deleted file mode 100644 index 0126fcb0f46d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_for_manual_approval.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 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/2024-05-01/examples/PrivateEndpointCreateForManualApproval.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.py deleted file mode 100644 index f8093038adbf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_create_with_asg.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 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/2024-05-01/examples/PrivateEndpointCreateWithASG.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_delete.py deleted file mode 100644 index 4df4ff19b720..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_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_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/2024-05-01/examples/PrivateEndpointDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_create.py deleted file mode 100644 index ae786c27d8a7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_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 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/2024-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_delete.py deleted file mode 100644 index c7c3516c86ed..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_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 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/2024-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_get.py deleted file mode 100644 index 7acd8103fc61..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_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 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/2024-05-01/examples/PrivateEndpointDnsZoneGroupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_list.py deleted file mode 100644 index 52663efdf260..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_dns_zone_group_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 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/2024-05-01/examples/PrivateEndpointDnsZoneGroupList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get.py deleted file mode 100644 index 4b43fcb6c283..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_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_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/2024-05-01/examples/PrivateEndpointGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.py deleted file mode 100644 index b5d924ee09e6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_for_manual_approval.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_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/2024-05-01/examples/PrivateEndpointGetForManualApproval.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.py deleted file mode 100644 index 54714f5da699..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_get_with_asg.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_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/2024-05-01/examples/PrivateEndpointGetWithASG.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list.py deleted file mode 100644 index 3268b0f1b2a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_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_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/2024-05-01/examples/PrivateEndpointList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.py deleted file mode 100644 index 75d5a512c43a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_endpoint_list_all.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_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/2024-05-01/examples/PrivateEndpointListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.py deleted file mode 100644 index 7d0034f36974..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_create.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 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/2024-05-01/examples/PrivateLinkServiceCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py deleted file mode 100644 index 7429af6f77a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_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_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/2024-05-01/examples/PrivateLinkServiceDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_private_endpoint_connection.py deleted file mode 100644 index 6a4801768511..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete_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_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/2024-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get.py deleted file mode 100644 index 97dd6edd21fb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_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_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/2024-05-01/examples/PrivateLinkServiceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.py deleted file mode 100644 index b1019a66ad65..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_get_private_endpoint_connection.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 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/2024-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list.py deleted file mode 100644 index 267913fa6f86..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_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_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/2024-05-01/examples/PrivateLinkServiceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.py deleted file mode 100644 index bc04867c6bb3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_all.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_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/2024-05-01/examples/PrivateLinkServiceListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.py deleted file mode 100644 index 7b93253eb1b6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_list_private_endpoint_connection.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 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/2024-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py b/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.py deleted file mode 100644 index be94c2712e28..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/private_link_service_update_private_endpoint_connection.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 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/2024-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.py deleted file mode 100644 index 0244c1a43a36..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_customized_values.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 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/2024-05-01/examples/PublicIpAddressCreateCustomizedValues.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.py deleted file mode 100644 index e532a3de980a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_defaults.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 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/2024-05-01/examples/PublicIpAddressCreateDefaults.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.py deleted file mode 100644 index 06a7ecc94f8d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns.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 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/2024-05-01/examples/PublicIpAddressCreateDns.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.py deleted file mode 100644 index 8e2061a3ae38..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_create_dns_with_domain_name_label_scope.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_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/2024-05-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_delete.py deleted file mode 100644 index 2ff324e0e6ba..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_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 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/2024-05-01/examples/PublicIpAddressDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get.py deleted file mode 100644 index 36325d69555d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_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 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/2024-05-01/examples/PublicIpAddressGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_get_ddos_protection_status.py deleted file mode 100644 index 7308c4dcae0b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_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 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/2024-05-01/examples/PublicIpAddressGetDdosProtectionStatus.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list.py deleted file mode 100644 index df76602d47ca..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_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 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/2024-05-01/examples/PublicIpAddressList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.py deleted file mode 100644 index a37db919054b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_list_all.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_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/2024-05-01/examples/PublicIpAddressListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_update_tags.py deleted file mode 100644 index c7a9bf534e65..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_address_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 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/2024-05-01/examples/PublicIpAddressUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.py deleted file mode 100644 index 8151a33e0526..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_customized_values.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 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/2024-05-01/examples/PublicIpPrefixCreateCustomizedValues.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.py deleted file mode 100644 index 233785335a57..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_create_defaults.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 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/2024-05-01/examples/PublicIpPrefixCreateDefaults.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_delete.py deleted file mode 100644 index 19ecda2ea09d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_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 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/2024-05-01/examples/PublicIpPrefixDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_get.py deleted file mode 100644 index a1e4579864df..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_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 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/2024-05-01/examples/PublicIpPrefixGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list.py deleted file mode 100644 index 53a36c5a9d52..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_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 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/2024-05-01/examples/PublicIpPrefixList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.py deleted file mode 100644 index 1db5f54b15b9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_list_all.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_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/2024-05-01/examples/PublicIpPrefixListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_update_tags.py deleted file mode 100644 index 9982ac71b4c3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/public_ip_prefix_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 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/2024-05-01/examples/PublicIpPrefixUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py b/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.py deleted file mode 100644 index be75e96835f7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/query_inbound_nat_rule_port_mapping.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 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/2024-05-01/examples/QueryInboundNatRulePortMapping.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_delete.py deleted file mode 100644 index be58901d5979..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_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 reachability_analysis_intent_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - client.reachability_analysis_intents.delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_intent_name="testAnalysisIntent", - ) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_get.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_get.py deleted file mode 100644 index 41f1fb5563ee..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_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 reachability_analysis_intent_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_intents.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_intent_name="testAnalysisIntentName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_list.py deleted file mode 100644 index 770ede1a9b3e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_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 reachability_analysis_intent_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_intents.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testVerifierWorkspace1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_intent_put.py deleted file mode 100644 index d36fad1a958e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_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 reachability_analysis_intent_put.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_intents.create( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_intent_name="testAnalysisIntentName", - body={ - "properties": { - "description": "A sample reachability analysis intent", - "destinationResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmDest", - "ipTraffic": { - "destinationIps": ["10.4.0.1"], - "destinationPorts": ["0"], - "protocols": ["Any"], - "sourceIps": ["10.4.0.0"], - "sourcePorts": ["0"], - }, - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/testVmSrc", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisIntentPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_delete.py deleted file mode 100644 index 98338138ccdd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_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 reachability_analysis_run_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - client.reachability_analysis_runs.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_run_name="testAnalysisRun", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_get.py deleted file mode 100644 index 9554db601554..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_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 reachability_analysis_run_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_runs.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_run_name="testAnalysisRunName", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_list.py deleted file mode 100644 index b0ce2d875cc2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_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 reachability_analysis_run_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_runs.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testVerifierWorkspace1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py b/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_put.py deleted file mode 100644 index bcb4b5750056..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/reachability_analysis_run_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 reachability_analysis_run_put.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.reachability_analysis_runs.create( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - reachability_analysis_run_name="testAnalysisRunName", - body={ - "properties": { - "description": "A sample reachability analysis run", - "intentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/verifierWorkspaces/testVerifierWorkspace1/reachabilityAnalysisIntents/testReachabilityAnalysisIntenant1", - } - }, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/ReachabilityAnalysisRunPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.py deleted file mode 100644 index dff6cb755699..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_create.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 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/2024-05-01/examples/RouteFilterCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_delete.py deleted file mode 100644 index d259217d292b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_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_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/2024-05-01/examples/RouteFilterDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_get.py deleted file mode 100644 index 9745232d1e4f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_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_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/2024-05-01/examples/RouteFilterGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list.py deleted file mode 100644 index ecbb9f6f68ea..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_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 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/2024-05-01/examples/RouteFilterList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_list_by_resource_group.py deleted file mode 100644 index 8c6353e88ee1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_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 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/2024-05-01/examples/RouteFilterListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_create.py deleted file mode 100644 index 3a06709cd996..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_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 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/2024-05-01/examples/RouteFilterRuleCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_delete.py deleted file mode 100644 index 82b0d20b837c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_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 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/2024-05-01/examples/RouteFilterRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_get.py deleted file mode 100644 index 8e0ba073af31..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_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 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/2024-05-01/examples/RouteFilterRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.py deleted file mode 100644 index 3a803584a103..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_rule_list_by_route_filter.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_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/2024-05-01/examples/RouteFilterRuleListByRouteFilter.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/route_filter_update_tags.py deleted file mode 100644 index 67d49579d00a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_filter_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 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/2024-05-01/examples/RouteFilterUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_delete.py deleted file mode 100644 index fe133e435a0a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_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 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/2024-05-01/examples/RouteMapDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_get.py deleted file mode 100644 index 23426303a016..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_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 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/2024-05-01/examples/RouteMapGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_list.py deleted file mode 100644 index d9f8c7cff97e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_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 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/2024-05-01/examples/RouteMapList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py b/sdk/network/azure-mgmt-network/generated_samples/route_map_put.py deleted file mode 100644 index 471d9bed2f01..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_map_put.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 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/2024-05-01/examples/RouteMapPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_create.py deleted file mode 100644 index a0b61ff837cf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_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_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/2024-05-01/examples/RouteTableCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.py deleted file mode 100644 index 8c5c677b6921..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_create_with_route.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 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/2024-05-01/examples/RouteTableCreateWithRoute.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_delete.py deleted file mode 100644 index b72bde4fbce8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/RouteTableDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_get.py deleted file mode 100644 index cabc88e89d94..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/RouteTableGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_list.py deleted file mode 100644 index 64322935bebe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/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 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/2024-05-01/examples/RouteTableList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.py deleted file mode 100644 index ad9a76cb91af..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_list_all.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_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/2024-05-01/examples/RouteTableListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.py deleted file mode 100644 index 5c938601a1c8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_create.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 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/2024-05-01/examples/RouteTableRouteCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_delete.py deleted file mode 100644 index f26bb3f84070..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_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 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/2024-05-01/examples/RouteTableRouteDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_get.py deleted file mode 100644 index 5182a3e434fc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_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 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/2024-05-01/examples/RouteTableRouteGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_route_list.py deleted file mode 100644 index 42e90c1c194d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_route_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 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/2024-05-01/examples/RouteTableRouteList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/route_table_update_tags.py deleted file mode 100644 index 3476f2d425f5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/route_table_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 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/2024-05-01/examples/RouteTableUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_delete.py deleted file mode 100644 index dca650a65988..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_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 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/2024-05-01/examples/RoutingIntentDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_get.py deleted file mode 100644 index e950374106ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_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 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/2024-05-01/examples/RoutingIntentGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_list.py deleted file mode 100644 index 64512ee8a7d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_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 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/2024-05-01/examples/RoutingIntentList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py b/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.py deleted file mode 100644 index ff2c8653516e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/routing_intent_put.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 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/2024-05-01/examples/RoutingIntentPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_delete.py deleted file mode 100644 index 55d4a6ccf587..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_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 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/2024-05-01/examples/SecurityPartnerProviderDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_get.py deleted file mode 100644 index 5714538e8a55..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_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 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/2024-05-01/examples/SecurityPartnerProviderGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_resource_group.py deleted file mode 100644 index de0cfd54f150..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_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 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/2024-05-01/examples/SecurityPartnerProviderListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.py deleted file mode 100644 index f202ad59f516..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_list_by_subscription.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_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/2024-05-01/examples/SecurityPartnerProviderListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_put.py deleted file mode 100644 index 5eb3a03ed0c7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_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 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/2024-05-01/examples/SecurityPartnerProviderPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_update_tags.py deleted file mode 100644 index 8bfc4aedf1f9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/security_partner_provider_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 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/2024-05-01/examples/SecurityPartnerProviderUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_community_list.py deleted file mode 100644 index 7d568e2b567d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_community_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_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/2024-05-01/examples/ServiceCommunityList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create.py deleted file mode 100644 index c163bd674572..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_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 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/2024-05-01/examples/ServiceEndpointPolicyCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.py deleted file mode 100644 index 468f3a1f4787..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_create_with_definition.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 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/2024-05-01/examples/ServiceEndpointPolicyCreateWithDefinition.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_delete.py deleted file mode 100644 index 73716cd90a9f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_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 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/2024-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_get.py deleted file mode 100644 index aaaca8bfe30b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_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 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/2024-05-01/examples/ServiceEndpointPolicyDefinitionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_list.py deleted file mode 100644 index e0cc3829f66f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_definition_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 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/2024-05-01/examples/ServiceEndpointPolicyDefinitionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_delete.py deleted file mode 100644 index ba6528b28224..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_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_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/2024-05-01/examples/ServiceEndpointPolicyDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_get.py deleted file mode 100644 index edc183be3361..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_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_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/2024-05-01/examples/ServiceEndpointPolicyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list.py deleted file mode 100644 index aecb2ef69be9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_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_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/2024-05-01/examples/ServiceEndpointPolicyList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.py deleted file mode 100644 index 335b22ecc4a1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_list_all.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_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/2024-05-01/examples/ServiceEndpointPolicyListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_update_tags.py deleted file mode 100644 index ef812de457f2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_endpoint_policy_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 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/2024-05-01/examples/ServiceEndpointPolicyUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.py deleted file mode 100644 index ebe40c433d1c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result.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_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/2024-05-01/examples/ServiceTagInformationListResult.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.py deleted file mode 100644 index 198af485011e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_no_address_prefixes.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_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/2024-05-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py b/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.py deleted file mode 100644 index 658f3ec6ee27..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tag_information_list_result_with_tagname.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_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/2024-05-01/examples/ServiceTagInformationListResultWithTagname.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py b/sdk/network/azure-mgmt-network/generated_samples/service_tags_list.py deleted file mode 100644 index dba19d6643e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/service_tags_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_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/2024-05-01/examples/ServiceTagsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.py deleted file mode 100644 index 7f05be3b3d4d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_create.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 static_cidrs_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.static_cidrs.create( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - static_cidr_name="TestStaticCidr", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Create.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_delete.py deleted file mode 100644 index fb38eea1e571..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_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 static_cidrs_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - client.static_cidrs.begin_delete( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - static_cidr_name="TestStaticCidr", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_get.py deleted file mode 100644 index 8b0f91fa82d1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_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 static_cidrs_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.static_cidrs.get( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - static_cidr_name="TestStaticCidr", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py b/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_list.py deleted file mode 100644 index 060ac126d0b5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/static_cidrs_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 static_cidrs_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="11111111-1111-1111-1111-111111111111", - ) - - response = client.static_cidrs.list( - resource_group_name="rg1", - network_manager_name="TestNetworkManager", - pool_name="TestPool", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/StaticCidrs_List.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create.py deleted file mode 100644 index 2caf4252cb79..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create.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 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/2024-05-01/examples/SubnetCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.py deleted file mode 100644 index c9f26f1c29b1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint.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 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/2024-05-01/examples/SubnetCreateServiceEndpoint.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.py deleted file mode 100644 index c2faaddc58b8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_service_endpoint_network_identifier.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 subnet_create_service_endpoint_network_identifier.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - 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": [ - { - "networkIdentifier": { - "id": "/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip" - }, - "service": "Microsoft.Storage", - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.py deleted file mode 100644 index d74445efc745..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_delegation.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 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/2024-05-01/examples/SubnetCreateWithDelegation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.py deleted file mode 100644 index 41606f35c53d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_create_with_sharing_scope.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 subnet_create_with_sharing_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.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/2024-05-01/examples/SubnetCreateWithSharingScope.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_delete.py deleted file mode 100644 index 95b1532b7f6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_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 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/2024-05-01/examples/SubnetDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get.py deleted file mode 100644 index 71d709e6f68d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_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 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/2024-05-01/examples/SubnetGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_delegation.py deleted file mode 100644 index a00b5645ca17..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_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_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/2024-05-01/examples/SubnetGetWithDelegation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.py deleted file mode 100644 index fa825d8be6e4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_get_with_sharing_scope.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_get_with_sharing_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.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/2024-05-01/examples/SubnetGetWithSharingScope.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_list.py deleted file mode 100644 index 697d1db9e7b2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_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 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/2024-05-01/examples/SubnetList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.py deleted file mode 100644 index 52e03ce42c61..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_prepare_network_policies.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_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/2024-05-01/examples/SubnetPrepareNetworkPolicies.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py b/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.py deleted file mode 100644 index f8d742bd104e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/subnet_unprepare_network_policies.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_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/2024-05-01/examples/SubnetUnprepareNetworkPolicies.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/usage_list.py b/sdk/network/azure-mgmt-network/generated_samples/usage_list.py deleted file mode 100644 index 09a5c228f358..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_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 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/2024-05-01/examples/UsageList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py b/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.py deleted file mode 100644 index 0ebe0376b7ec..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/usage_list_spaced_location.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 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/2024-05-01/examples/UsageListSpacedLocation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_delete.py deleted file mode 100644 index 0ff00838c1ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_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 verifier_workspace_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - client.verifier_workspaces.begin_delete( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - ).result() - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_get.py deleted file mode 100644 index 3666055da719..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_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 verifier_workspace_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.verifier_workspaces.get( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_list.py deleted file mode 100644 index 5184a5353ac9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_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 verifier_workspace_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.verifier_workspaces.list( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.py deleted file mode 100644 index 3111ccfd6071..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_patch.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 verifier_workspace_patch.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.verifier_workspaces.update( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePatch.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py b/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.py deleted file mode 100644 index 3d85105ca8b0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/verifier_workspace_put.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 verifier_workspace_put.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", - ) - - response = client.verifier_workspaces.create( - resource_group_name="rg1", - network_manager_name="testNetworkManager", - workspace_name="testWorkspace", - body={"location": "eastus", "properties": {"description": "A sample workspace"}}, - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VerifierWorkspacePut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_delete.py deleted file mode 100644 index 6605875d9178..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_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 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/2024-05-01/examples/VirtualHubBgpConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_get.py deleted file mode 100644 index 69b01356af95..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_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 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/2024-05-01/examples/VirtualHubBgpConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_list.py deleted file mode 100644 index 626164a3097f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_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 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/2024-05-01/examples/VirtualHubBgpConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_put.py deleted file mode 100644 index ad8bf3388192..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_bgp_connection_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_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/2024-05-01/examples/VirtualHubBgpConnectionPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_delete.py deleted file mode 100644 index 9c39d1c9d9b1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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_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/2024-05-01/examples/VirtualHubDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_get.py deleted file mode 100644 index 854dfe9bb528..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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_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/2024-05-01/examples/VirtualHubGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_delete.py deleted file mode 100644 index f4a992681e31..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_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 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/2024-05-01/examples/VirtualHubIpConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_get.py deleted file mode 100644 index 4905bbc7ae1d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_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 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/2024-05-01/examples/VirtualHubIpConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_list.py deleted file mode 100644 index ed11c78e4274..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_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 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/2024-05-01/examples/VirtualHubIpConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_put.py deleted file mode 100644 index 8bcb8e4678a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_ip_configuration_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_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/2024-05-01/examples/VirtualHubIpConfigurationPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list.py deleted file mode 100644 index b19577e6ae2a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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 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/2024-05-01/examples/VirtualHubList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_list_by_resource_group.py deleted file mode 100644 index 890db461da64..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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 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/2024-05-01/examples/VirtualHubListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_put.py deleted file mode 100644 index afebfa56491f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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 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/2024-05-01/examples/VirtualHubPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_delete.py deleted file mode 100644 index 4689a2be5f9d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_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 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/2024-05-01/examples/VirtualHubRouteTableV2Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_get.py deleted file mode 100644 index a7391dcf02e6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_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 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/2024-05-01/examples/VirtualHubRouteTableV2Get.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_list.py deleted file mode 100644 index 2fc2c6b45f79..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_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 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/2024-05-01/examples/VirtualHubRouteTableV2List.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_put.py deleted file mode 100644 index 9db3f1c90b6e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_route_table_v2_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 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/2024-05-01/examples/VirtualHubRouteTableV2Put.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_update_tags.py deleted file mode 100644 index 8a15d3f2e51e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_hub_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 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/2024-05-01/examples/VirtualHubUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.py deleted file mode 100644 index c26690e66336..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_check_ip_address_availability.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_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", - ip_address="10.0.1.4", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create.py deleted file mode 100644 index b459fffa610e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_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 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/2024-05-01/examples/VirtualNetworkCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.py deleted file mode 100644 index 1cba38df473c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoint_policy.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 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/2024-05-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.py deleted file mode 100644 index d3b005815d42..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_service_endpoints.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 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/2024-05-01/examples/VirtualNetworkCreateServiceEndpoints.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.py deleted file mode 100644 index d64393498e8e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet.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_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/2024-05-01/examples/VirtualNetworkCreateSubnet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py deleted file mode 100644 index 43aed453ec64..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.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_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/2024-05-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.py deleted file mode 100644 index 43b13ffc6ae0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_delegation.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 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/2024-05-01/examples/VirtualNetworkCreateSubnetWithDelegation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.py deleted file mode 100644 index c6654d6f12a9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_bgp_communities.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_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/2024-05-01/examples/VirtualNetworkCreateWithBgpCommunities.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.py deleted file mode 100644 index 40858ffef4a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_encryption.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_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/2024-05-01/examples/VirtualNetworkCreateWithEncryption.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py deleted file mode 100644 index 3f1d1a38fd51..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_with_ipam_pool.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.network import NetworkManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-network -# USAGE - python virtual_network_create_with_ipam_pool.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.virtual_networks.begin_create_or_update( - resource_group_name="rg1", - virtual_network_name="test-vnet", - parameters={ - "location": "eastus", - "properties": { - "addressSpace": { - "ipamPoolPrefixAllocations": [ - { - "numberOfIpAddresses": "65536", - "pool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool" - }, - } - ] - }, - "subnets": [ - { - "name": "test-1", - "properties": { - "ipamPoolPrefixAllocations": [ - { - "numberOfIpAddresses": "80", - "pool": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1/ipamPools/testIpamPool" - }, - } - ] - }, - } - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkCreateWithIpamPool.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_delete.py deleted file mode 100644 index 4aba6a1a29e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_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_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/2024-05-01/examples/VirtualNetworkDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py deleted file mode 100644 index 4b48875e189b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_create.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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/2024-05-01/examples/VirtualNetworkGatewayConnectionCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_delete.py deleted file mode 100644 index 977387d60194..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get.py deleted file mode 100644 index 561c5c31c4c7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.py deleted file mode 100644 index 9dd294e22502..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_ike_sas.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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_shared_key.py deleted file mode 100644 index 583fb57bb131..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_get_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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset.py deleted file mode 100644 index 77e2c7fa1a03..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionReset.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.py deleted file mode 100644 index c956b2ba683f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_reset_shared_key.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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.py deleted file mode 100644 index 914fe1402870..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_set_shared_key.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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture.py deleted file mode 100644 index 28ed1a27d46e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_start_packet_capture_filter_data.py deleted file mode 100644 index 9ef4cb5d6a1c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.py deleted file mode 100644 index ce779531f210..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_stop_packet_capture.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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_update_tags.py deleted file mode 100644 index 361f14a3b9bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connection_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 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/2024-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_list.py deleted file mode 100644 index ad74f4adfb7d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_connections_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_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/2024-05-01/examples/VirtualNetworkGatewayConnectionsList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_delete.py deleted file mode 100644 index 37e0cb2d2be8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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_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/2024-05-01/examples/VirtualNetworkGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get.py deleted file mode 100644 index 53cfb39a5ffc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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_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/2024-05-01/examples/VirtualNetworkGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.py deleted file mode 100644 index 00523e5ecabf..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_advertised_routes.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_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", - peer="test", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_status.py deleted file mode 100644 index bfa2cdd71247..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_bgp_peer_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_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/2024-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.py deleted file mode 100644 index 16ce6f5d2382..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_all_tests_details.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_get_failover_all_tests_details.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.virtual_network_gateways.begin_get_failover_all_test_details( - resource_group_name="rg1", - virtual_network_gateway_name="ergw", - type="SingleSiteFailover", - fetch_latest="true", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.py deleted file mode 100644 index e724f5e01961..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_failover_single_test_details.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_get_failover_single_test_details.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.virtual_network_gateways.begin_get_failover_single_test_details( - resource_group_name="rg1", - virtual_network_gateway_name="ergw", - peering_location="Vancouver", - failover_test_id="fe458ae8-d2ae-4520-a104-44bc233bde7e", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.py deleted file mode 100644 index c691d4223ae1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_client_ipsec_parameters.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_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/2024-05-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.py deleted file mode 100644 index dc2761af45e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpn_profile_package_url.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_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/2024-05-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.py deleted file mode 100644 index af1ac5d8dfc4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_get_vpnclient_connection_health.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_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/2024-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.py deleted file mode 100644 index 268a2774a23b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_learned_routes.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_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/2024-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_list.py deleted file mode 100644 index 9d71e60de274..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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_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/2024-05-01/examples/VirtualNetworkGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_delete.py deleted file mode 100644 index 34640b3fd2a4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_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 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/2024-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_get.py deleted file mode 100644 index 0e544bc47406..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_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 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/2024-05-01/examples/VirtualNetworkGatewayNatRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_list.py deleted file mode 100644 index ca52a24738b3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_nat_rule_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 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/2024-05-01/examples/VirtualNetworkGatewayNatRuleList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset.py deleted file mode 100644 index 880711873f4d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayReset.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_shared_key.py deleted file mode 100644 index 14259c8e53da..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_reset_vpn_client_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_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/2024-05-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.py deleted file mode 100644 index 52edbd2dad9d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_set_vpn_client_ipsec_parameters.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_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/2024-05-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture.py deleted file mode 100644 index e10031b0c702..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayStartPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_packet_capture_filter_data.py deleted file mode 100644 index 31b153b27531..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.py deleted file mode 100644 index 20ccb3eca7d5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_start_site_failover_simulation.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_network_gateway_start_site_failover_simulation.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.virtual_network_gateways.begin_start_express_route_site_failover_simulation( - resource_group_name="rg1", - virtual_network_gateway_name="ergw", - peering_location="Vancouver", - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.py deleted file mode 100644 index f70d40cb60dd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_packet_capture.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_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/2024-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.py deleted file mode 100644 index df1024196e58..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_stop_site_failover_simulation.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_network_gateway_stop_site_failover_simulation.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetworkManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.virtual_network_gateways.begin_stop_express_route_site_failover_simulation( - resource_group_name="rg1", - virtual_network_gateway_name="ergw", - stop_parameters={ - "details": [ - {"failoverConnectionName": "conn1", "failoverLocation": "Denver", "isVerified": False}, - {"failoverConnectionName": "conn2", "failoverLocation": "Amsterdam", "isVerified": True}, - ], - "peeringLocation": "Vancouver", - "wasSimulationSuccessful": True, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.py deleted file mode 100644 index e14231b13804..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_supported_vpn_device.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_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/2024-05-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.py deleted file mode 100644 index 3ee5e8666ad5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update.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 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/2024-05-01/examples/VirtualNetworkGatewayUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_update_tags.py deleted file mode 100644 index d09c6608ce23..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_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 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/2024-05-01/examples/VirtualNetworkGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.py deleted file mode 100644 index 2db88869d9e7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateway_vpn_device_configuration_script.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_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/2024-05-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_connections.py deleted file mode 100644 index d8caf9a25ba7..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_disconnect_p2s_vpn_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_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/2024-05-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.py deleted file mode 100644 index 0a681adab74e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_gateways_list_connections.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_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/2024-05-01/examples/VirtualNetworkGatewaysListConnections.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get.py deleted file mode 100644 index ca3747bff19e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_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_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/2024-05-01/examples/VirtualNetworkGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.py deleted file mode 100644 index 2218de568b1a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_ddos_protection_status.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_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/2024-05-01/examples/VirtualNetworkGetDdosProtectionStatus.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.py deleted file mode 100644 index 2df4573bbede..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_resource_navigation_links.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_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/2024-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.py deleted file mode 100644 index 8772fe78d280..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_service_association_links.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_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/2024-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.py deleted file mode 100644 index 430937e36164..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_service_association_link.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_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/2024-05-01/examples/VirtualNetworkGetWithServiceAssociationLink.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_delegation.py deleted file mode 100644 index 9917903f0ae9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_get_with_subnet_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 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/2024-05-01/examples/VirtualNetworkGetWithSubnetDelegation.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list.py deleted file mode 100644 index 1780573a5331..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_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_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/2024-05-01/examples/VirtualNetworkList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.py deleted file mode 100644 index d98db06f15a0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_all.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_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/2024-05-01/examples/VirtualNetworkListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.py deleted file mode 100644 index f5c460fe6c8e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_list_usage.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_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/2024-05-01/examples/VirtualNetworkListUsage.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_delete.py deleted file mode 100644 index 18ec9f147beb..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_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 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/2024-05-01/examples/VirtualNetworkPeeringDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get.py deleted file mode 100644 index a1dd983e0452..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_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 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/2024-05-01/examples/VirtualNetworkPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.py deleted file mode 100644 index d3a08d8e5cd4..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_get_with_remote_virtual_network_encryption.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_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/2024-05-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list.py deleted file mode 100644 index fbaf019cd34e..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_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 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/2024-05-01/examples/VirtualNetworkPeeringList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.py deleted file mode 100644 index 30d690c10963..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_peering_list_with_remote_virtual_network_encryption.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_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/2024-05-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_get.py deleted file mode 100644 index 16dedaed9343..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_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_scalable_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="ergw", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py deleted file mode 100644 index df7b98006708..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_scalable_gateway_update.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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_scalable_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="ergw", - parameters={ - "location": "centralus", - "properties": { - "activeActive": False, - "allowRemoteVnetTraffic": False, - "allowVirtualWanTraffic": False, - "bgpSettings": None, - "disableIPSecReplayProtection": False, - "enableBgp": False, - "enableBgpRouteTranslationForNat": False, - "gatewayType": "ExpressRoute", - "ipConfigurations": [ - { - "name": "gwipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "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/ergw/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/ergw/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": "ErGwScale", "tier": "ErGwScale"}, - "vpnClientConfiguration": None, - "vpnType": "PolicyBased", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VirtualNetworkScalableGatewayUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_get.py deleted file mode 100644 index 19d806b5ed0f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_subnet_peering_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 virtual_network_subnet_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/2024-05-01/examples/VirtualNetworkSubnetPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_create.py deleted file mode 100644 index d5f62b9b9794..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_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 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/2024-05-01/examples/VirtualNetworkTapCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_delete.py deleted file mode 100644 index 1c443db9b365..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_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_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/2024-05-01/examples/VirtualNetworkTapDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_get.py deleted file mode 100644 index f9d61203b528..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_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_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/2024-05-01/examples/VirtualNetworkTapGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list.py deleted file mode 100644 index a088ba0538b1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_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_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/2024-05-01/examples/VirtualNetworkTapList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.py deleted file mode 100644 index 77d984a5d69b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_list_all.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_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/2024-05-01/examples/VirtualNetworkTapListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_update_tags.py deleted file mode 100644 index 3de71a7a16f1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_tap_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 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/2024-05-01/examples/VirtualNetworkTapUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_update_tags.py deleted file mode 100644 index 7fe992db6ecd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_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 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/2024-05-01/examples/VirtualNetworkUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_get.py deleted file mode 100644 index 925ebc9f99ac..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_network_v6_subnet_peering_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 virtual_network_v6_subnet_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/2024-05-01/examples/VirtualNetworkV6SubnetPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_delete.py deleted file mode 100644 index f52410b389cc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_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_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/2024-05-01/examples/VirtualRouterDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_get.py deleted file mode 100644 index 869b2b9da649..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_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_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/2024-05-01/examples/VirtualRouterGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_resource_group.py deleted file mode 100644 index 37df4058c632..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_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 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/2024-05-01/examples/VirtualRouterListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.py deleted file mode 100644 index fe07cadc15cc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_list_by_subscription.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_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/2024-05-01/examples/VirtualRouterListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.py deleted file mode 100644 index 3e7cfd617429..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_advertised_route.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_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/2024-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.py deleted file mode 100644 index a57e9bbd8f2a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peer_list_learned_route.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_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/2024-05-01/examples/VirtualRouterPeerListLearnedRoute.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_delete.py deleted file mode 100644 index ba40a915e27d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_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 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/2024-05-01/examples/VirtualRouterPeeringDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_get.py deleted file mode 100644 index 6ed94d97e826..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_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 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/2024-05-01/examples/VirtualRouterPeeringGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_list.py deleted file mode 100644 index 8692cedaa313..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_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 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/2024-05-01/examples/VirtualRouterPeeringList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.py deleted file mode 100644 index 7e20ea9a26b6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_peering_put.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_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/2024-05-01/examples/VirtualRouterPeeringPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_router_put.py deleted file mode 100644 index 33bb04963805..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_router_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_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/2024-05-01/examples/VirtualRouterPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_delete.py deleted file mode 100644 index 030b5af3c35a..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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_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/2024-05-01/examples/VirtualWANDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_get.py deleted file mode 100644 index ecd31d82dc64..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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_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/2024-05-01/examples/VirtualWANGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list.py deleted file mode 100644 index a20a56e41d26..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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 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/2024-05-01/examples/VirtualWANList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_list_by_resource_group.py deleted file mode 100644 index dd922cf4660c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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 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/2024-05-01/examples/VirtualWANListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_put.py deleted file mode 100644 index 293f6dd5cf05..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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 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/2024-05-01/examples/VirtualWANPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.py deleted file mode 100644 index 5d01ac20dd63..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_supported_security_providers.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_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/2024-05-01/examples/VirtualWanSupportedSecurityProviders.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_update_tags.py deleted file mode 100644 index 16c9a26dfc0d..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/virtual_wan_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 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/2024-05-01/examples/VirtualWANUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_get.py deleted file mode 100644 index 7870bf7b1c9b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_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 vmss_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_virtual_machine_scale_set_network_interface( - resource_group_name="rg1", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index="1", - network_interface_name="nic1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_get.py deleted file mode 100644 index 9a0ce2bcc7f1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_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 vmss_network_interface_ip_config_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_virtual_machine_scale_set_ip_configuration( - resource_group_name="rg1", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index="2", - network_interface_name="nic1", - ip_configuration_name="ip1", - ) - print(response) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_list.py deleted file mode 100644 index fded8bb65963..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_ip_config_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 vmss_network_interface_ip_config_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_virtual_machine_scale_set_ip_configurations( - resource_group_name="rg1", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index="2", - network_interface_name="nic1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceIpConfigList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_network_interface_list.py deleted file mode 100644 index 41da423b227f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_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 vmss_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_virtual_machine_scale_set_network_interfaces( - resource_group_name="rg1", - virtual_machine_scale_set_name="vmss1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssNetworkInterfaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.py deleted file mode 100644 index 7244b3f7100f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_get.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 vmss_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_virtual_machine_scale_set_public_ip_address( - resource_group_name="vmss-tester", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index=1, - 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/2024-05-01/examples/VmssPublicIpGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.py deleted file mode 100644 index 2ce7b394015b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_public_ip_list_all.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 vmss_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_virtual_machine_scale_set_public_ip_addresses( - resource_group_name="vmss-tester", - virtual_machine_scale_set_name="vmss1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssPublicIpListAll.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_list.py deleted file mode 100644 index 1c4b39b433bc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_network_interface_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 vmss_vm_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_virtual_machine_scale_set_vm_network_interfaces( - resource_group_name="rg1", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index="1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VmssVmNetworkInterfaceList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py b/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_list.py deleted file mode 100644 index a0109dc6f3d0..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vmss_vm_public_ip_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 vmss_vm_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_virtual_machine_scale_set_vm_public_ip_addresses( - resource_group_name="vmss-tester", - virtual_machine_scale_set_name="vmss1", - virtualmachine_index=1, - 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/2024-05-01/examples/VmssVmPublicIpList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_delete.py deleted file mode 100644 index 18ea0a76f2dc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_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 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/2024-05-01/examples/VpnConnectionDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_get.py deleted file mode 100644 index 20e1261884cc..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_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_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/2024-05-01/examples/VpnConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_list.py deleted file mode 100644 index c6365740738c..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_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_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/2024-05-01/examples/VpnConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.py deleted file mode 100644 index 7d629a932164..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture.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_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/2024-05-01/examples/VpnConnectionStartPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.py deleted file mode 100644 index f0e19b3fd7c9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_start_packet_capture_filter_data.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_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/2024-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.py deleted file mode 100644 index dd3ca13b6be1..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_connection_stop_packet_capture.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_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/2024-05-01/examples/VpnConnectionStopPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_delete.py deleted file mode 100644 index 532e9a5b72a6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_get.py deleted file mode 100644 index 815f2e140b6f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list.py deleted file mode 100644 index fdcd69ed5fa3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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 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/2024-05-01/examples/VpnGatewayList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_list_by_resource_group.py deleted file mode 100644 index 8c248f84e825..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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 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/2024-05-01/examples/VpnGatewayListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.py deleted file mode 100644 index cd90ed24e8c9..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_put.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 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/2024-05-01/examples/VpnGatewayPut.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_reset.py deleted file mode 100644 index 9d28f180c1ff..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayReset.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture.py deleted file mode 100644 index 35e31ea06c32..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayStartPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_start_packet_capture_filter_data.py deleted file mode 100644 index 1e91262e66c5..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_stop_packet_capture.py deleted file mode 100644 index 6528da80a8d6..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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_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/2024-05-01/examples/VpnGatewayStopPacketCapture.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_update_tags.py deleted file mode 100644 index d3133aad0180..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_gateway_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 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/2024-05-01/examples/VpnGatewayUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_delete.py deleted file mode 100644 index 1f5dbde086a2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_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 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/2024-05-01/examples/VpnServerConfigurationDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_get.py deleted file mode 100644 index 2377c3905e0b..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_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 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/2024-05-01/examples/VpnServerConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list.py deleted file mode 100644 index fa52c2f08509..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_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 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/2024-05-01/examples/VpnServerConfigurationList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_list_by_resource_group.py deleted file mode 100644 index 5115fff70b14..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_server_configuration_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 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/2024-05-01/examples/VpnServerConfigurationListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_delete.py deleted file mode 100644 index 324adc89cefe..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_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 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/2024-05-01/examples/VpnSiteDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_get.py deleted file mode 100644 index 39cb7d5f0821..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_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 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/2024-05-01/examples/VpnSiteGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_get.py deleted file mode 100644 index 55c4f135f658..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_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 vpn_site_link_connection_default_shared_key_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_link_connections.get_default_shared_key( - 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/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_list.py deleted file mode 100644 index 9b511675162f..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_default_shared_key_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 vpn_site_link_connection_default_shared_key_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_default_shared_key( - 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/2024-05-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get.py deleted file mode 100644 index adf94c662ce3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_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 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/2024-05-01/examples/VpnSiteLinkConnectionGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.py deleted file mode 100644 index d942446fefb2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_get_ike_sas.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_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/2024-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_list.py deleted file mode 100644 index eabdd6a86421..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_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 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/2024-05-01/examples/VpnSiteLinkConnectionList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.py deleted file mode 100644 index 752f73651098..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_reset.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_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/2024-05-01/examples/VpnSiteLinkConnectionReset.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_get.py deleted file mode 100644 index ab1f92287fcd..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_connection_shared_keys_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 vpn_site_link_connection_shared_keys_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_link_connections.get_all_shared_keys( - resource_group_name="rg1", - gateway_name="gateway1", - connection_name="vpnConnection1", - link_connection_name="Connection-Link1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/VpnSiteLinkConnectionSharedKeysGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_get.py deleted file mode 100644 index 57a55fc509da..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_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_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/2024-05-01/examples/VpnSiteLinkGet.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.py deleted file mode 100644 index 732907bbf131..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_link_list_by_vpn_site.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_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/2024-05-01/examples/VpnSiteLinkListByVpnSite.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list.py deleted file mode 100644 index 1f5572d490d3..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_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 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/2024-05-01/examples/VpnSiteList.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_site_list_by_resource_group.py deleted file mode 100644 index 89ca3bbf95e8..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_site_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 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/2024-05-01/examples/VpnSiteListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py b/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.py deleted file mode 100644 index 67afe1a5da01..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/vpn_sites_configuration_download.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 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/2024-05-01/examples/VpnSitesConfigurationDownload.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py b/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.py deleted file mode 100644 index 2eff30d7da86..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_all_policies.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_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/2024-05-01/examples/WafListAllPolicies.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py b/sdk/network/azure-mgmt-network/generated_samples/waf_list_policies.py deleted file mode 100644 index aecb22a58116..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_list_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 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/2024-05-01/examples/WafListPolicies.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py deleted file mode 100644 index 31fe513852ad..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_create_or_update.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is 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", - }, - { - "action": "JSChallenge", - "matchConditions": [ - { - "matchValues": ["192.168.1.0/24"], - "matchVariables": [{"selector": None, "variableName": "RemoteAddr"}], - "operator": "IPMatch", - }, - { - "matchValues": ["Bot"], - "matchVariables": [{"selector": "UserAgent", "variableName": "RequestHeaders"}], - "operator": "Contains", - }, - ], - "name": "Rule4", - "priority": 4, - "ruleType": "MatchRule", - }, - ], - "managedRules": { - "exceptions": [ - { - "exceptionManagedRuleSets": [{"ruleSetType": "OWASP", "ruleSetVersion": "3.2"}], - "matchVariable": "RequestURI", - "valueMatchOperator": "Contains", - "values": ["health", "account/images", "default.aspx"], - }, - { - "exceptionManagedRuleSets": [ - { - "ruleGroups": [{"ruleGroupName": "REQUEST-932-APPLICATION-ATTACK-RCE"}], - "ruleSetType": "OWASP", - "ruleSetVersion": "3.2", - } - ], - "matchVariable": "RequestHeader", - "selector": "User-Agent", - "selectorMatchOperator": "StartsWith", - "valueMatchOperator": "Contains", - "values": ["Mozilla/5.0", "Chrome/122.0.0.0"], - }, - { - "exceptionManagedRuleSets": [ - { - "ruleGroups": [{"ruleGroupName": "BadBots", "rules": [{"ruleId": "100100"}]}], - "ruleSetType": "Microsoft_BotManagerRuleSet", - "ruleSetVersion": "1.0", - } - ], - "matchVariable": "RemoteAddr", - "valueMatchOperator": "IPMatch", - "values": ["1.2.3.4", "10.0.0.1/6"], - }, - ], - "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", - }, - { - "ruleGroupOverrides": [ - { - "ruleGroupName": "UnknownBots", - "rules": [{"action": "JSChallenge", "ruleId": "300700", "state": "Enabled"}], - } - ], - "ruleSetType": "Microsoft_BotManagerRuleSet", - "ruleSetVersion": "1.0", - }, - { - "ruleGroupOverrides": [ - { - "ruleGroupName": "ExcessiveRequests", - "rules": [ - { - "action": "Block", - "ruleId": "500100", - "sensitivity": "High", - "state": "Enabled", - } - ], - } - ], - "ruleSetType": "Microsoft_HTTPDDoSRuleSet", - "ruleSetVersion": "1.0", - }, - ], - }, - "policySettings": { - "jsChallengeCookieExpirationInMins": 100, - "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/2024-05-01/examples/WafPolicyCreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_delete.py deleted file mode 100644 index 6c3a8d85eb30..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_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 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/2024-05-01/examples/WafPolicyDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py b/sdk/network/azure-mgmt-network/generated_samples/waf_policy_get.py deleted file mode 100644 index 5c8224fe22b2..000000000000 --- a/sdk/network/azure-mgmt-network/generated_samples/waf_policy_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 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/2024-05-01/examples/WafPolicyGet.json -if __name__ == "__main__": - main()