From 22cc12df84e4f639e667a5b9b3d1e1de4c5634b8 Mon Sep 17 00:00:00 2001 From: "Kerwin(Kaihui) Sun" Date: Wed, 28 Jul 2021 13:09:15 +0800 Subject: [PATCH] Add private link test for service bus (#18999) --- .../custom.py | 2 +- ...ivate_endpoint_connection_service_bus.yaml | 1351 +++++++++++++++++ .../latest/test_private_endpoint_commands.py | 12 + 3 files changed, 1364 insertions(+), 1 deletion(-) create mode 100644 src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_service_bus.yaml diff --git a/src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py b/src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py index c322e6cfc41..815582ba612 100644 --- a/src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py +++ b/src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py @@ -43,7 +43,7 @@ def register_providers(): # "Microsoft.OffAzure/masterSites", "2020-07-07", False # "Microsoft.Purview/accounts", "2020-12-01-preview", True _register_one_provider('Microsoft.Search/searchServices', '2020-08-01', True) - # "Microsoft.ServiceBus/namespaces", "2018-01-01-preview", True + _register_one_provider("Microsoft.ServiceBus/namespaces", "2018-01-01-preview", True) _register_one_provider('Microsoft.SignalRService/signalr', '2020-05-01', False) _register_one_provider('Microsoft.Sql/servers', '2018-06-01-preview', True) _register_one_provider('Microsoft.Storage/storageAccounts', '2019-06-01', True) diff --git a/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_service_bus.yaml b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_service_bus.yaml new file mode 100644 index 00000000000..be02327a6e9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_service_bus.yaml @@ -0,0 +1,1351 @@ +interactions: +- request: + body: '{"location": "eastus", "sku": {"name": "Premium", "tier": "Premium"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace create + Connection: + - keep-alive + Content-Length: + - '69' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l --sku + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:51:34.753Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '705' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:51:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace create + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --sku + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:51:34.753Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '705' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:52:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace create + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --sku + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:51:34.753Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '705' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:52:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace create + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --sku + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:52:54.487Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Active"}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace create + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --sku + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:52:54.487Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Active"}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - servicebus namespace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-servicebus/6.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006?api-version=2018-01-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.ServiceBus/Namespaces","location":"East + US","tags":{},"properties":{"zoneRedundant":false,"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-resource-000006","createdAt":"2021-07-27T06:51:34.753Z","updatedAt":"2021-07-27T06:52:54.487Z","serviceBusEndpoint":"https://cli-test-resource-000006.servicebus.windows.net:443/","status":"Active"}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-link-resource list + Connection: + - keep-alive + ParameterSetName: + - --name -g --type + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.26.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateLinkResources?api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateLinkResources/namespace","name":"namespace","type":"Microsoft.ServiceBus/namespaces/privateLinkResources","properties":{"groupId":"namespace","requiredMembers":["namespace"],"requiredZoneNames":["privatelink.servicebus.windows.net"]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '469' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -n -g --subnet-name + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_private_endpoint_connection_service_bus000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001","name":"test_private_endpoint_connection_service_bus000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-07-27T06:51:23Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "cli-subnet-000003", + "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": + "Enabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '315' + Content-Type: + - application/json + ParameterSetName: + - -n -g --subnet-name + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-vnet-000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002\",\r\n + \ \"etag\": \"W/\\\"940a29dc-251d-46d4-afa8-11b52e8207b1\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"0094b8e0-a9a0-42bd-a9be-3e6225babe75\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"cli-subnet-000003\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"940a29dc-251d-46d4-afa8-11b52e8207b1\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a7d61961-33a2-49dc-acc5-33625e8ea29d?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '1494' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 70a97e84-986b-436f-b2d3-58a6a64a40d5 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -n -g --subnet-name + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a7d61961-33a2-49dc-acc5-33625e8ea29d?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - eb99a908-57b2-4e39-b189-a2c4687371b4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -n -g --subnet-name + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-vnet-000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002\",\r\n + \ \"etag\": \"W/\\\"313114ce-ab30-4834-a2be-85d96fe44281\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"0094b8e0-a9a0-42bd-a9be-3e6225babe75\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"cli-subnet-000003\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"313114ce-ab30-4834-a2be-85d96fe44281\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1496' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:25 GMT + etag: + - W/"313114ce-ab30-4834-a2be-85d96fe44281" + 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: + - 0f540f9b-944b-4c05-99c2-172c00efb26a + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"313114ce-ab30-4834-a2be-85d96fe44281\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:26 GMT + etag: + - W/"313114ce-ab30-4834-a2be-85d96fe44281" + 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: + - 61346e29-df43-47af-a376-9f5d1cbfea46 + status: + code: 200 + message: OK +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003", + "name": "cli-subnet-000003", "type": "Microsoft.Network/virtualNetworks/subnets", + "properties": {"addressPrefix": "10.0.0.0/24", "delegations": [], "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + Content-Length: + - '504' + Content-Type: + - application/json + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"02d0ce0f-7d33-4485-b591-e8e185879ac3\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f2fe676-02fb-46a0-bc00-719f54fb00e2?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 75e98e72-7b92-4428-a443-7f3c0c4f79a2 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f2fe676-02fb-46a0-bc00-719f54fb00e2?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 0e82e0a0-0879-460c-b537-9e0548802281 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"d88b4ec3-e345-4441-a11f-4fa2e12d4cda\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '640' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:31 GMT + etag: + - W/"d88b4ec3-e345-4441-a11f-4fa2e12d4cda" + 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: + - 63c02d75-4f1d-4b95-9e5c-eb9e476778f9 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_private_endpoint_connection_service_bus000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001","name":"test_private_endpoint_connection_service_bus000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-07-27T06:51:23Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003", + "properties": {"privateEndpointNetworkPolicies": "Enabled", "privateLinkServiceNetworkPolicies": + "Enabled"}}, "privateLinkServiceConnections": [{"name": "cli-pec-000005", "properties": + {"privateLinkServiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006", + "groupIds": ["namespace"]}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + Content-Length: + - '766' + Content-Type: + - application/json + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-pe-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\",\r\n + \ \"etag\": \"W/\\\"cec7a940-0221-4180-aad0-1e1398c2f580\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"3407f239-cb9b-4dc6-85e6-006250b9482d\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"cli-pec-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004/privateLinkServiceConnections/cli-pec-000005\",\r\n + \ \"etag\": \"W/\\\"cec7a940-0221-4180-aad0-1e1398c2f580\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006\",\r\n + \ \"groupIds\": [\r\n \"namespace\"\r\n ],\r\n + \ \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\"\r\n + \ },\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000004.nic.b07e245a-6472-400c-b0b6-48b3931dd1c6\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/12939999-b798-4892-abba-2ef190f67040?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '2316' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:53:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 88953c45-d8a2-4689-8ba0-22b3bc99528d + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/12939999-b798-4892-abba-2ef190f67040?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:54:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b59d166d-748a-4687-872b-2e341bbc73d1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/12939999-b798-4892-abba-2ef190f67040?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:54:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 0a2687cf-5d96-47fa-b596-4cf0cc00da6f + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/12939999-b798-4892-abba-2ef190f67040?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:54:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 16aa3be7-c955-4e67-ae8e-94f3963ea61d + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/12939999-b798-4892-abba-2ef190f67040?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:55:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 126a8cd8-3a39-4ab6-a7b8-5fca505141aa + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet --connection-name --private-connection-resource-id + --group-id + User-Agent: + - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"cli-pe-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\",\r\n + \ \"etag\": \"W/\\\"2d7b2575-2173-48fc-879c-a7f8ca029ab9\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"3407f239-cb9b-4dc6-85e6-006250b9482d\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"cli-pec-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004/privateLinkServiceConnections/cli-pec-000005\",\r\n + \ \"etag\": \"W/\\\"2d7b2575-2173-48fc-879c-a7f8ca029ab9\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006\",\r\n + \ \"groupIds\": [\r\n \"namespace\"\r\n ],\r\n + \ \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"Auto-Approved\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\"\r\n + \ },\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000004.nic.b07e245a-6472-400c-b0b6-48b3931dd1c6\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": [\r\n {\r\n \"fqdn\": + \"cli-test-resource-000006.servicebus.windows.net\",\r\n \"ipAddresses\": + [\r\n \"10.0.0.4\"\r\n ]\r\n }\r\n ]\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2481' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:55:12 GMT + etag: + - W/"2d7b2575-2173-48fc-879c-a7f8ca029ab9" + 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: + - 0db2407a-c0dc-4383-954d-d965e1a584be + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint-connection list + Connection: + - keep-alive + ParameterSetName: + - --name -g --type + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.26.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections?api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections/a68c8dfa-05db-46bb-b2c0-f7c8602632fa","name":"a68c8dfa-05db-46bb-b2c0-f7c8602632fa","type":"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections","location":"East + US","properties":{"provisioningState":"Succeeded","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004"},"privateLinkServiceConnectionState":{"status":"Approved","description":"Auto-Approved"}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '804' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:55:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint-connection show + Connection: + - keep-alive + ParameterSetName: + - --name -g --resource-name --type + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.26.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections/a68c8dfa-05db-46bb-b2c0-f7c8602632fa?api-version=2018-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections/a68c8dfa-05db-46bb-b2c0-f7c8602632fa","name":"a68c8dfa-05db-46bb-b2c0-f7c8602632fa","type":"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections","location":"East + US","properties":{"provisioningState":"Succeeded","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004"},"privateLinkServiceConnectionState":{"status":"Approved","description":"Auto-Approved"}}}' + headers: + cache-control: + - no-cache + content-length: + - '792' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:55:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint-connection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name -g --resource-name --type -y + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.26.1 + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections/a68c8dfa-05db-46bb-b2c0-f7c8602632fa?api-version=2018-01-01-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_service_bus000001/providers/Microsoft.ServiceBus/namespaces/cli-test-resource-000006/privateEndpointConnections/a68c8dfa-05db-46bb-b2c0-f7c8602632fa/operationStatus/a68c8dfa-05db-46bb-b2c0-f7c8602632fa?api-version=2018-01-01-preview&operationType=Delete + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:55:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py b/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py index 7440feac92f..76be34f8fef 100644 --- a/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py +++ b/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py @@ -2003,6 +2003,18 @@ def test_private_endpoint_connection_sql_server(self, resource_group): _test_private_endpoint(self, approve=False, rejected=False) + @ResourceGroupPreparer(name_prefix="test_private_endpoint_connection_service_bus") + def test_private_endpoint_connection_service_bus(self, resource_group): + self.kwargs.update({ + 'rg': resource_group, + 'cmd': 'servicebus namespace', + 'list_num': 1, + 'type': 'Microsoft.ServiceBus/namespaces', + 'extra_create': '-l eastus --sku Premium' + }) + + _test_private_endpoint(self, approve=False, rejected=False) + if __name__ == '__main__': unittest.main()