diff --git a/src/azure-cli/azure/cli/command_modules/network/custom.py b/src/azure-cli/azure/cli/command_modules/network/custom.py index c415cdd1865..1e6a880a460 100644 --- a/src/azure-cli/azure/cli/command_modules/network/custom.py +++ b/src/azure-cli/azure/cli/command_modules/network/custom.py @@ -3630,8 +3630,8 @@ def list_load_balancer_nic(cmd, resource_group_name, load_balancer_name): def create_lb_inbound_nat_rule( cmd, resource_group_name, load_balancer_name, item_name, protocol, backend_port, frontend_port=None, frontend_ip_name=None, floating_ip=None, idle_timeout=None, enable_tcp_reset=None, - frontend_port_range_start=None, frontend_port_range_end=None): - InboundNatRule = cmd.get_models('InboundNatRule') + frontend_port_range_start=None, frontend_port_range_end=None, backend_pool_name=None): + InboundNatRule, SubResource = cmd.get_models('InboundNatRule', 'SubResource') ncf = network_client_factory(cmd.cli_ctx) lb = lb_get(ncf.load_balancers, resource_group_name, load_balancer_name) if not frontend_ip_name: @@ -3648,6 +3648,9 @@ def create_lb_inbound_nat_rule( new_rule.frontend_port_range_end = frontend_port_range_end if frontend_port_range_start and cmd.supported_api_version('2021-03-01'): new_rule.frontend_port_range_start = frontend_port_range_start + if backend_pool_name and cmd.supported_api_version('2021-03-01'): + backend_pool_id = get_property(lb.backend_address_pools, backend_pool_name).id + new_rule.backend_address_pool = SubResource(id=backend_pool_id) upsert_to_collection(lb, 'inbound_nat_rules', new_rule, 'name') poller = ncf.load_balancers.begin_create_or_update(resource_group_name, load_balancer_name, lb) return get_property(poller.result().inbound_nat_rules, item_name) diff --git a/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_lb_nat_rules_v3.yaml b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_lb_nat_rules_v3.yaml new file mode 100644 index 00000000000..164982231db --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_lb_nat_rules_v3.yaml @@ -0,0 +1,1173 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lb_nat_rules_v3000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001","name":"cli_test_lb_nat_rules_v3000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2021-12-27T06:36:51Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '343' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:36:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_lb_nat_rules_v3000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FpublicIPAddresses%27&api-version=2021-04-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:36:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": + [{"apiVersion": "2021-05-01", "type": "Microsoft.Network/publicIPAddresses", + "name": "PublicIPlb1", "location": "eastus2euap", "tags": {}, "dependsOn": [], + "properties": {"publicIPAllocationMethod": "Static"}, "sku": {"name": "Standard"}}, + {"type": "Microsoft.Network/loadBalancers", "name": "lb1", "location": "eastus2euap", + "tags": {}, "apiVersion": "2021-05-01", "dependsOn": ["Microsoft.Network/publicIpAddresses/PublicIPlb1"], + "properties": {"backendAddressPools": [{"name": "lb1bepool"}], "frontendIPConfigurations": + [{"name": "LoadBalancerFrontEnd", "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}, + "privateIPAddressVersion": "IPv4"}}]}, "sku": {"name": "Standard"}}], "outputs": + {"loadBalancer": {"type": "object", "value": "[reference(''lb1'')]"}}}, "parameters": + {}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb create + Connection: + - keep-alive + Content-Length: + - '1150' + Content-Type: + - application/json + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/lb_deploy_JOSUoQs3bTwfycxIIf3hWRtdOiwl6Pkq","name":"lb_deploy_JOSUoQs3bTwfycxIIf3hWRtdOiwl6Pkq","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13031206605457886868","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-12-27T06:37:04.0420005Z","duration":"PT0.0005082S","correlationId":"7cc9a2e1-75b8-4787-8174-3065b32b049a","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"publicIPAddresses","locations":["eastus2euap"]},{"resourceType":"loadBalancers","locations":["eastus2euap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"PublicIPlb1"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1","resourceType":"Microsoft.Network/loadBalancers","resourceName":"lb1"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/lb_deploy_JOSUoQs3bTwfycxIIf3hWRtdOiwl6Pkq/operationStatuses/08585610198642221615?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '1222' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:37:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1192' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585610198642221615?api-version=2021-04-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:37:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Resources/deployments/lb_deploy_JOSUoQs3bTwfycxIIf3hWRtdOiwl6Pkq","name":"lb_deploy_JOSUoQs3bTwfycxIIf3hWRtdOiwl6Pkq","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13031206605457886868","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-12-27T06:37:33.9562757Z","duration":"PT29.9147834S","correlationId":"7cc9a2e1-75b8-4787-8174-3065b32b049a","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"publicIPAddresses","locations":["eastus2euap"]},{"resourceType":"loadBalancers","locations":["eastus2euap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"PublicIPlb1"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1","resourceType":"Microsoft.Network/loadBalancers","resourceName":"lb1"}],"outputs":{"loadBalancer":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"23352e03-b043-455f-9714-f1fb1a0fb7fb","frontendIPConfigurations":[{"name":"LoadBalancerFrontEnd","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd","etag":"W/\"019c59a2-ae06-4555-a949-ecdcfe10fbf3\"","type":"Microsoft.Network/loadBalancers/frontendIPConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","publicIPAddress":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}}}],"backendAddressPools":[{"name":"lb1bepool","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool","etag":"W/\"019c59a2-ae06-4555-a949-ecdcfe10fbf3\"","properties":{"provisioningState":"Succeeded","loadBalancerBackendAddresses":[]},"type":"Microsoft.Network/loadBalancers/backendAddressPools"}],"loadBalancingRules":[],"probes":[],"inboundNatRules":[],"outboundRules":[],"inboundNatPools":[]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '2864' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:37:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule create + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --protocol --backend-port --frontend-port-range-start --frontend-port-range-end + --backend-pool-name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"019c59a2-ae06-4555-a949-ecdcfe10fbf3\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"019c59a2-ae06-4555-a949-ecdcfe10fbf3\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"019c59a2-ae06-4555-a949-ecdcfe10fbf3\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": []\r\n },\r\n \"type\": + \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n }\r\n ],\r\n + \ \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\": + [],\r\n \"outboundRules\": [],\r\n \"inboundNatPools\": []\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1992' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:37:38 GMT + etag: + - W/"019c59a2-ae06-4555-a949-ecdcfe10fbf3" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 6be18dde-a0e5-4d79-8213-9b99f437a902 + status: + code: 200 + message: '' +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1", + "location": "eastus2euap", "tags": {}, "sku": {"name": "Standard", "tier": "Regional"}, + "properties": {"frontendIPConfigurations": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd", + "name": "LoadBalancerFrontEnd", "properties": {"privateIPAllocationMethod": + "Dynamic", "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}}}], + "backendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool", + "name": "lb1bepool", "properties": {"loadBalancerBackendAddresses": []}}], "loadBalancingRules": + [], "probes": [], "inboundNatRules": [{"name": "rule3", "properties": {"frontendIPConfiguration": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd", + "name": "LoadBalancerFrontEnd", "properties": {"privateIPAllocationMethod": + "Dynamic", "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}}}, + "protocol": "Tcp", "backendPort": 30, "frontendPortRangeStart": 0, "frontendPortRangeEnd": + 3, "backendAddressPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool"}}}], + "inboundNatPools": [], "outboundRules": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule create + Connection: + - keep-alive + Content-Length: + - '1988' + Content-Type: + - application/json + ParameterSetName: + - -g --lb-name -n --protocol --backend-port --frontend-port-range-start --frontend-port-range-end + --backend-pool-name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n + \ \"inboundNatRules\": [\r\n {\r\n \"name\": \"rule3\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 3,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/36552c13-a611-401e-866b-7672f05001e8?api-version=2021-05-01 + cache-control: + - no-cache + content-length: + - '3856' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:37:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - f9ddebf8-1e06-4be6-92f1-4e4c30aa7a5d + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule create + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --protocol --backend-port --frontend-port-range-start --frontend-port-range-end + --backend-pool-name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/36552c13-a611-401e-866b-7672f05001e8?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - afbf0087-f6c8-449c-825a-dceae66e343d + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule create + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --protocol --backend-port --frontend-port-range-start --frontend-port-range-end + --backend-pool-name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n + \ \"inboundNatRules\": [\r\n {\r\n \"name\": \"rule3\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 3,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3856' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:13 GMT + etag: + - W/"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 12b0e6a1-105d-41e4-84c2-542ea115fbb0 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule update + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --floating-ip --idle-timeout --frontend-port-range-end + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n + \ \"inboundNatRules\": [\r\n {\r\n \"name\": \"rule3\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 3,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3856' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:15 GMT + etag: + - W/"3bc102ad-5f3e-4796-aee1-7d76fde6dbb9" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b2ebd963-f943-48ea-af87-8f3d5b9878c3 + status: + code: 200 + message: '' +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1", + "location": "eastus2euap", "tags": {}, "sku": {"name": "Standard", "tier": "Regional"}, + "properties": {"frontendIPConfigurations": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd", + "name": "LoadBalancerFrontEnd", "properties": {"privateIPAllocationMethod": + "Dynamic", "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}}}], + "backendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool", + "name": "lb1bepool", "properties": {"loadBalancerBackendAddresses": []}}], "loadBalancingRules": + [], "probes": [], "inboundNatRules": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3", + "name": "rule3", "properties": {"frontendIPConfiguration": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd"}, + "protocol": "Tcp", "frontendPort": 0, "backendPort": 30, "idleTimeoutInMinutes": + 10, "enableFloatingIP": true, "enableTcpReset": false, "frontendPortRangeStart": + 0, "frontendPortRangeEnd": 5, "backendAddressPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool"}}}], + "inboundNatPools": [], "outboundRules": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule update + Connection: + - keep-alive + Content-Length: + - '1987' + Content-Type: + - application/json + ParameterSetName: + - -g --lb-name -n --floating-ip --idle-timeout --frontend-port-range-end + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": []\r\n },\r\n \"type\": + \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n }\r\n ],\r\n + \ \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"name\": \"rule3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 10,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 5,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/9018af52-e540-4c3f-97f2-45c35a282158?api-version=2021-05-01 + cache-control: + - no-cache + content-length: + - '3591' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 5b48c99b-e374-4c46-94ab-e7397cff21d5 + x-ms-ratelimit-remaining-subscription-writes: + - '1193' + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule update + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --floating-ip --idle-timeout --frontend-port-range-end + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/9018af52-e540-4c3f-97f2-45c35a282158?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 64cac962-c00b-42e2-b85e-501e358e4184 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule update + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n --floating-ip --idle-timeout --frontend-port-range-end + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n + \ \"inboundNatRules\": [\r\n {\r\n \"name\": \"rule3\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 10,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 5,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3856' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:48 GMT + etag: + - W/"b644e892-dd61-494b-8527-d66bbcd274d4" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 62056fc3-6af6-4761-987c-4c5ace948619 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule delete + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ },\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"inboundNatRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n + \ \"inboundNatRules\": [\r\n {\r\n \"name\": \"rule3\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule3\",\r\n + \ \"etag\": \"W/\\\"b644e892-dd61-494b-8527-d66bbcd274d4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\"\r\n + \ },\r\n \"frontendPort\": 0,\r\n \"backendPort\": + 30,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 10,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"frontendPortRangeStart\": 0,\r\n \"frontendPortRangeEnd\": + 5,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [],\r\n + \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3856' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:50 GMT + etag: + - W/"b644e892-dd61-494b-8527-d66bbcd274d4" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ca26a6e8-b1f0-41c4-9c80-cd11a191e244 + status: + code: 200 + message: '' +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1", + "location": "eastus2euap", "tags": {}, "sku": {"name": "Standard", "tier": "Regional"}, + "properties": {"frontendIPConfigurations": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd", + "name": "LoadBalancerFrontEnd", "properties": {"privateIPAllocationMethod": + "Dynamic", "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1"}}}], + "backendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool", + "name": "lb1bepool", "properties": {"loadBalancerBackendAddresses": []}}], "loadBalancingRules": + [], "probes": [], "inboundNatRules": [], "inboundNatPools": [], "outboundRules": + []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule delete + Connection: + - keep-alive + Content-Length: + - '1152' + Content-Type: + - application/json + ParameterSetName: + - -g --lb-name -n + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": []\r\n },\r\n \"type\": + \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n }\r\n ],\r\n + \ \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\": + [],\r\n \"outboundRules\": [],\r\n \"inboundNatPools\": []\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/8259ad44-5348-4ce1-ade7-af0a31c7ac73?api-version=2021-05-01 + cache-control: + - no-cache + content-length: + - '1992' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:38:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b190bda4-945f-4ceb-9673-fa912a860b24 + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule delete + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/8259ad44-5348-4ce1-ade7-af0a31c7ac73?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:39:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b2b7d101-a565-44d3-a920-bb46d6784c75 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network lb inbound-nat-rule delete + Connection: + - keep-alive + ParameterSetName: + - -g --lb-name -n + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"lb1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"23352e03-b043-455f-9714-f1fb1a0fb7fb\",\r\n \"frontendIPConfigurations\": + [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/LoadBalancerFrontEnd\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/publicIPAddresses/PublicIPlb1\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"lb1bepool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lb_nat_rules_v3000001/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/lb1bepool\",\r\n + \ \"etag\": \"W/\\\"a2a3cd8a-08b9-44f5-811b-418af41c67c8\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": []\r\n },\r\n \"type\": + \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n }\r\n ],\r\n + \ \"loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\": + [],\r\n \"outboundRules\": [],\r\n \"inboundNatPools\": []\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1992' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 Dec 2021 06:39:23 GMT + etag: + - W/"a2a3cd8a-08b9-44f5-811b-418af41c67c8" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ff4a9ca1-8a03-4a23-9642-ef1e3dee7b61 + status: + code: 200 + message: '' +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py b/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py index 4650efe2ff6..0c9c24d3a49 100644 --- a/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py +++ b/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py @@ -2992,6 +2992,27 @@ def test_network_lb_nat_rules_v2(self, resource_group): checks=self.check('frontendPortRangeEnd', 5)) self.cmd('network lb inbound-nat-rule delete -g {rg} --lb-name {lb} -n rule3') + @ResourceGroupPreparer(name_prefix='cli_test_lb_nat_rules_v3', location='eastus2euap') + def test_network_lb_nat_rules_v3(self, resource_group): + self.kwargs.update({ + 'lb': 'lb1', + 'backend': 'lb1bepool', + }) + + self.cmd('network lb create -g {rg} -n {lb} --sku Standard') + + # test lb inbound-nat-rule create with new param --backend-pool-name + self.cmd('network lb inbound-nat-rule create -g {rg} --lb-name {lb} -n rule3 --protocol tcp --backend-port 30 ' + '--frontend-port-range-start 0 --frontend-port-range-end 3 --backend-pool-name {backend}', checks=[ + self.check('name', 'rule3'), + self.check('frontendPortRangeStart', 0), + self.check('frontendPortRangeEnd', 3), + self.check("contains(backendAddressPool.id, '{backend}')", True)]) + self.cmd( + 'network lb inbound-nat-rule update -g {rg} --lb-name {lb} -n rule3 --floating-ip true --idle-timeout 10 --frontend-port-range-end 5', + checks=self.check('frontendPortRangeEnd', 5)) + self.cmd('network lb inbound-nat-rule delete -g {rg} --lb-name {lb} -n rule3') + @ResourceGroupPreparer(name_prefix='cli_test_lb_nat_pools', location='eastus2') def test_network_lb_nat_pools(self, resource_group):