From 2a48f7b93c79e6083500444d99c951fc3f17cd76 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Tue, 27 Jul 2021 15:40:01 +0800 Subject: [PATCH 1/2] Add private link test for storagesync --- .../custom.py | 2 +- ...vate_endpoint_connection_storage_sync.yaml | 1184 +++++++++++++++++ .../latest/test_private_endpoint_commands.py | 12 + 3 files changed, 1197 insertions(+), 1 deletion(-) create mode 100644 src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_storage_sync.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..fcee3a6c8c9 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 @@ -47,7 +47,7 @@ def register_providers(): _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) - # "Microsoft.StorageSync/storageSyncServices", "2020-03-01", True + _register_one_provider("Microsoft.StorageSync/storageSyncServices", "2020-03-01", True) _register_one_provider("Microsoft.Synapse/workspaces", "2019-06-01-preview", True) _register_one_provider('Microsoft.Web/sites', '2019-08-01', False) # "Microsoft.Web/hostingEnvironments", "2020-10-01", True diff --git a/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_storage_sync.yaml b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_storage_sync.yaml new file mode 100644 index 00000000000..21fbdc870d4 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_storage_sync.yaml @@ -0,0 +1,1184 @@ +interactions: +- request: + body: '{"location": "eastus", "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storagesync create + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-storagesync/1.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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006?api-version=2019-06-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"storageSyncServiceStatus\": 0\r\n + \ },\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006\",\r\n + \ \"name\": \"cli-test-resource-000006\",\r\n \"type\": \"microsoft.storagesync/storageSyncServices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '430' + content-type: + - application/json + date: + - Tue, 27 Jul 2021 07:35:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storagesync show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.26.1 azsdk-python-mgmt-storagesync/1.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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006?api-version=2019-06-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"storageSyncServiceStatus\": 0\r\n + \ },\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006\",\r\n + \ \"name\": \"cli-test-resource-000006\",\r\n \"type\": \"microsoft.storagesync/storageSyncServices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '430' + content-type: + - application/json + date: + - Tue, 27 Jul 2021 07:35:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + 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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006/privateLinkResources?api-version=2020-03-01 + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"groupId\": + \"Afs\",\r\n \"requiredMembers\": [\r\n \"management\",\r\n + \ \"sync.primary\",\r\n \"sync.secondary\",\r\n \"monitoring\"\r\n + \ ],\r\n \"requiredZoneNames\": [\r\n \"privatelink.afs.azure.net\"\r\n + \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006/privateLinkResources/Afs\",\r\n + \ \"name\": \"Afs\",\r\n \"type\": \"microsoft.storagesync/storageSyncServices/privateLinkResources\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json + date: + - Tue, 27 Jul 2021 07:35:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + 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_storage_sync000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001","name":"test_private_endpoint_connection_storage_sync000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-07-27T07:34:56Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:35:17 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002\",\r\n + \ \"etag\": \"W/\\\"426283d3-ab89-49c8-abe1-83f7328ef048\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"91aa67c1-a983-436c-be5f-54f39bc2edbb\",\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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"426283d3-ab89-49c8-abe1-83f7328ef048\\\"\",\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/d435a990-00fc-4180-9a42-05e644d62f89?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '1494' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:35:24 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: + - 73c720a9-3222-4cb1-be0e-5745d778a80c + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + 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/d435a990-00fc-4180-9a42-05e644d62f89?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 07:35:27 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: + - 134dfb94-f5a3-477f-9a17-dc8b77507d7c + 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002\",\r\n + \ \"etag\": \"W/\\\"17c0cb3a-4b8b-4d32-9861-011299076096\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"91aa67c1-a983-436c-be5f-54f39bc2edbb\",\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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"17c0cb3a-4b8b-4d32-9861-011299076096\\\"\",\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 07:35:28 GMT + etag: + - W/"17c0cb3a-4b8b-4d32-9861-011299076096" + 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: + - 33f889e0-fad3-4193-9610-ba020e0c4c6f + 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"17c0cb3a-4b8b-4d32-9861-011299076096\\\"\",\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 07:35:29 GMT + etag: + - W/"17c0cb3a-4b8b-4d32-9861-011299076096" + 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: + - 26332f2a-8104-44df-9043-ea9c7aee8954 + status: + code: 200 + message: OK +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"01e82e05-862c-42ea-82d8-25f1d5a87470\\\"\",\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/a7e4f9b9-dc30-4502-b42f-46fd2d654bd6?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:35: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: + - 702a5d36-6897-4b9b-ab1f-bef60cb4daf6 + 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/a7e4f9b9-dc30-4502-b42f-46fd2d654bd6?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 07:35:34 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: + - 603f87e3-8241-46a8-9fd6-f58ad94bff52 + 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000002/subnets/cli-subnet-000003\",\r\n + \ \"etag\": \"W/\\\"2288e7ef-571c-4b0e-8805-43ff13896133\\\"\",\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 07:35:34 GMT + etag: + - W/"2288e7ef-571c-4b0e-8805-43ff13896133" + 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: + - d746668a-e196-4592-848e-f8286e2fefef + 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_storage_sync000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001","name":"test_private_endpoint_connection_storage_sync000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-07-27T07:34:56Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:35:36 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_storage_sync000001/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_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006", + "groupIds": ["Afs"]}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + Content-Length: + - '770' + 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\",\r\n + \ \"etag\": \"W/\\\"8b957562-8610-4543-a3b3-acfe9202198a\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"789cf769-5670-4fc3-a7e1-f44115909d30\",\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_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004/privateLinkServiceConnections/cli-pec-000005\",\r\n + \ \"etag\": \"W/\\\"8b957562-8610-4543-a3b3-acfe9202198a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006\",\r\n + \ \"groupIds\": [\r\n \"Afs\"\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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000004.nic.42212d73-d44d-4fbf-be8f-ef60fe8ed0ba\"\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/6913a4d0-acac-4e4a-84f8-5de3aed471e9?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '2320' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:35:45 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: + - 75cf1f49-c66f-408d-a2b0-c7bb416c8ab5 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + 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/6913a4d0-acac-4e4a-84f8-5de3aed471e9?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 07:35:56 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: + - 0c5fef76-3d3e-4062-b99f-4625c51ccd5f + 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/6913a4d0-acac-4e4a-84f8-5de3aed471e9?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 07:36:06 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: + - c176d446-717d-4b85-96dc-8385a8d084fc + 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/6913a4d0-acac-4e4a-84f8-5de3aed471e9?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 07:36:26 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: + - 42669c6a-fef2-4f6a-a857-6cad4b4eea76 + 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/6913a4d0-acac-4e4a-84f8-5de3aed471e9?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 07:37:06 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: + - 06141e39-c2db-448b-bab4-1b62f3299f61 + 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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\",\r\n + \ \"etag\": \"W/\\\"c3754eda-59a5-465a-b54b-274c532f891c\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"789cf769-5670-4fc3-a7e1-f44115909d30\",\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_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004/privateLinkServiceConnections/cli-pec-000005\",\r\n + \ \"etag\": \"W/\\\"c3754eda-59a5-465a-b54b-274c532f891c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006\",\r\n + \ \"groupIds\": [\r\n \"Afs\"\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_storage_sync000001/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_storage_sync000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000004.nic.42212d73-d44d-4fbf-be8f-ef60fe8ed0ba\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": [\r\n {\r\n \"fqdn\": + \"cli-test-resource-000006management.eastus.afs.azure.net\",\r\n \"ipAddresses\": + [\r\n \"10.0.0.4\"\r\n ]\r\n },\r\n {\r\n \"fqdn\": + \"cli-test-resource-000006syncp.eastus.afs.azure.net\",\r\n \"ipAddresses\": + [\r\n \"10.0.0.5\"\r\n ]\r\n },\r\n {\r\n \"fqdn\": + \"cli-test-resource-000006syncs.eastus.afs.azure.net\",\r\n \"ipAddresses\": + [\r\n \"10.0.0.6\"\r\n ]\r\n },\r\n {\r\n \"fqdn\": + \"cli-test-resource-000006monitoring.eastus.afs.azure.net\",\r\n \"ipAddresses\": + [\r\n \"10.0.0.7\"\r\n ]\r\n }\r\n ]\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2932' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 07:37:06 GMT + etag: + - W/"c3754eda-59a5-465a-b54b-274c532f891c" + 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: + - d3d8d505-8bd4-4881-8043-fc7d0ad0b286 + 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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006/privateEndpointConnections?api-version=2020-03-01 + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006/privateEndpointConnections/cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30\",\r\n + \ \"name\": \"cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30\",\r\n + \ \"type\": \"microsoft.storagesync/storageSyncServices/privateEndpointConnections\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1037' + content-type: + - application/json + date: + - Tue, 27 Jul 2021 07:37:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + 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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006/privateEndpointConnections/cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30?api-version=2020-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000004\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_storage_sync000001/providers/microsoft.storagesync/storageSyncServices/cli-test-resource-000006/privateEndpointConnections/cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30\",\r\n + \ \"name\": \"cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30\",\r\n \"type\": + \"microsoft.storagesync/storageSyncServices/privateEndpointConnections\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '948' + content-type: + - application/json + date: + - Tue, 27 Jul 2021 07:37:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + 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_storage_sync000001/providers/Microsoft.StorageSync/storageSyncServices/cli-test-resource-000006/privateEndpointConnections/cli-pe-000004.789cf769-5670-4fc3-a7e1-f44115909d30?api-version=2020-03-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.storagesync/locations/eastus/operations/eyJwYXJ0aXRpb25JZCI6IjZkODVhMjE5LWRmNGEtNDQ5Zi1iNGU3LTZjOGQ4OTkyOTNiNSIsIndvcmtmbG93SWQiOiJkMWUxMzRlYy1hMjQyLTRlZmQtYTZiZC1mMDA0Yjk0N2Q1NjMiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiYjMyNTVmZTUtYjgwNC00OWQ1LWE1ZmEtMjE4ODI3ZjczYmFlIn0=?api-version=2020-03-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 07:37:17 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.storagesync/locations/eastus/operationresults/eyJwYXJ0aXRpb25JZCI6IjZkODVhMjE5LWRmNGEtNDQ5Zi1iNGU3LTZjOGQ4OTkyOTNiNSIsIndvcmtmbG93SWQiOiJkMWUxMzRlYy1hMjQyLTRlZmQtYTZiZC1mMDA0Yjk0N2Q1NjMiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiYjMyNTVmZTUtYjgwNC00OWQ1LWE1ZmEtMjE4ODI3ZjczYmFlIn0=?api-version=2020-03-01 + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-powered-by: + - ASP.NET + 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..3a521b00925 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_storage_sync") + def test_private_endpoint_connection_storage_sync(self, resource_group): + self.kwargs.update({ + 'rg': resource_group, + 'cmd': 'storagesync', + 'list_num': 1, + 'type': 'Microsoft.StorageSync/storageSyncServices', + 'extra_create': '-l eastus' + }) + + _test_private_endpoint(self, approve=False, rejected=False) + if __name__ == '__main__': unittest.main() From a06238960aec7a2013bdeeabd514b71576f390ea Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Wed, 28 Jul 2021 17:16:45 +0800 Subject: [PATCH 2/2] Skip storagesync test in record test --- .../network/tests/latest/test_private_endpoint_commands.py | 2 ++ 1 file changed, 2 insertions(+) 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 52ddd228ea2..d9257d712e5 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,7 @@ def test_private_endpoint_connection_sql_server(self, resource_group): _test_private_endpoint(self, approve=False, rejected=False) + @live_only() @ResourceGroupPreparer(name_prefix="test_private_endpoint_connection_storage_sync") def test_private_endpoint_connection_storage_sync(self, resource_group): self.kwargs.update({ @@ -2012,6 +2013,7 @@ def test_private_endpoint_connection_storage_sync(self, resource_group): 'type': 'Microsoft.StorageSync/storageSyncServices', 'extra_create': '-l eastus' }) + # self.cmd('extension add -n storagesync') _test_private_endpoint(self, approve=False, rejected=False)